[R] problem in import and export

Jean V Adams
Tue, 17 Jan 2012 21:47:05 -0000

mukul purva wrote on 01/16/2012 01:35:00 AM:

> hello,
>        i hav a prob in R lang. i want to do correlation of data frame
> 22810(gene) rows and 1436 colums(experiment) when i covert this file
> in csv or xls format it reads only 1024 cloumns. n when i do
> correlation of data mean 22810 *22810 matrix made in terminal then i
> export in csv or xls by write.table it will give me only 1024 columns
> rather than 22810 columns.wat i do
> plzzz help me... for this file what should the syntax of import and
> export...


It's difficult to help you without an example of your code.  I created a
very simple example of a data frame with 1,500 columns and had no
difficulty saving it to a csv file and viewing the file with both a text
editor and with MS Excel (2007) for Windows.

df <- data.frame(matrix(1:3000, nrow=2))
write.csv(df, "C:\\junk.csv", quote=FALSE)

You may also want to investigate the write.matrix() function in the MASS
package.
?write.matrix

Jean

	[[alternative HTML version deleted]]