[BioC] save R object

Joern Toedling toedling at ebi.ac.uk
Fri Jun 1 12:32:33 CEST 2007


Hello,

this really depends on what kind of R object you want to write to a
file. "save" indeed only saves your object in a binary format so that it
can be restored in the next R session by using the function "load". If
you want to divert your output resulting from entering commands in your
R session "sink" is the right command for that and "sink()" is required
to close this connection.
If you want to export a data frame to be viewed in some
Spreadsheet-focused program such as Excel or any text editor, please
have a look at the manual page for the function "write.table".
Another very elegant way to export your analyses and results into a
document that can easily be distributed to other people is using the
"Sweave"' Rnw format. Bioconductor vignettes are written in this format.

Joern


ruma wrote:
> Dear List,
>
> I have trouble saving my R objects in the home directory.
> I tried using the save(), write(), sink() function, but all save the files
> in a format which can be viewed only in the R environment.
> Is there any other way in which we can store the R outputs in standard
> formats which can be viewed in vi editor or any other editor...???
> As my output data is quite large enough, the output scrolls over the screen
> and I'm unable to view it...and hence, fail to analyze it..!! Can anyone
> help me in this regard..??
>
> Thanks in advance,
> Ruma Sanyal
> Bioinformatics Team
> Center for Development of Advanced Computing
> Pune
> India.
>
>



More information about the Bioconductor mailing list