Re: [R] Correlation coefficient of large data sets

2010-03-15 Thread Joshua Wiley
I think what you have done should be fine. read.table() will return a data frame, which cor() can handle happily. For example: my.data <- read.table("file.csv", header = TRUE, row.names = 1, sep=",", strip.white = TRUE) # assign your data to "my.data" cor(my.data) # calculate the correlation ma

Re: [R] Correlation coefficient of large data sets

2010-03-15 Thread Vincent Davis
> > If you read each of your 230,000 variables in separately, you can > combine them into a matrix or dataframe using cbind(variablename1, 2, > etc.). > > HTH, I used read.table("file.csv", header = TRUE, row.names = 1, sep=",", strip.white = TRUE) to read it in but I could easily only read in th

Re: [R] Correlation coefficient of large data sets

2010-03-15 Thread Joshua Wiley
Hello Vincent, The command to correlate two variables and a set is the same (see ?cor). How have you read the data in? If it is a matrix or data frame, you should be able to just use cor(name_of_your_matrix) and it will return the correlation matrix for all variables in your matrix or data frame

[R] Correlation coefficient of large data sets

2010-03-15 Thread Vincent Davis
So I am very new to R. Have been using python for a project and need to calculate the correlation coefficient matrix for my data set. the data is in the range of 10-15 observations of 230,000 variables. ie the correlation matrix would be 230,000X230,000 Using python and the numpy.corrcoef() I run