[R] exporting data.frame
tlumley at u.washington.edu
Fri May 10 17:10:49 CEST 2002
On Fri, 10 May 2002, Wataru Shito wrote:
> 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
The dump() and dput() commands do this. You could also use save() to save
an R binary file -- these are compatible across platforms and are
compressed to take up less space than dump()s.
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