[R] exporting data.frame

Wataru Shito shito at seinan-gu.ac.jp
Fri May 10 02:40:35 CEST 2002


Is there any simple command to write the data.frame to the file in the
format of command line input?

For example, I read a table as

  > data <-  read.table() 

and want to write out the 'data' object into my R file as

  data <- data.frame( some.column1=c( 1, 2 ),
                      some.column2=c( 1, 2 )
                      row.names=c("row name1", "row name2" )

so I don't have to type the data again in my library file to provide

Thank you, in advance.

Wataru Shito

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list