Proper use of use of "cor" function in R

Posted by order on Stack Overflow See other posts from Stack Overflow or by order
Published on 2012-06-24T03:05:09Z Indexed on 2012/06/24 3:16 UTC
Read the original article Hit count: 178

Filed under:
|

I am interested to know what a proper x (vector matrix or data frame) input looks like. I am currently using the function in two different sorts of matrices. However, I am not sure how R would interpret my data the way I intend. I will explain the types of matrix by example.

Type 1

           Gene1 Gene2 Gene3
    sample1
    sample2

Type 2

          Sample1 Sample2 Sample3
gene 1
gene 2
gene 3

Are either of these formats valid x parameters? I input both of types of matrices and get some results, but without knowing whether or not this a proper use the function, these are just random numbers. Thank you for your time. I apologize that this isn't more interesting.

© Stack Overflow or respective owner

Related posts about r

    Related posts about statistics