save R object
3
0
Entering edit mode
Ruma Sanyal ▴ 60
@ruma-sanyal-2133
Last seen 10.3 years ago
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.
• 1.3k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States
On Friday 01 June 2007 06:07, 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..?? What objects are you trying to view/analyze/save? In any case, look at write.table. Sean
ADD COMMENT
0
Entering edit mode
On Friday 01 June 2007 06:09, Sean Davis wrote: > On Friday 01 June 2007 06:07, 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..?? > > What objects are you trying to view/analyze/save? In any case, look at > write.table. Oh, I should have mentioned that there is an entire R manual on input/output available here: http://cran.r-project.org/doc/manuals/R-data.html Sean
ADD REPLY
0
Entering edit mode
@richard-pearson-1304
Last seen 10.3 years ago
Ruma ?write.table Cheers Richard. 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. > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > >
ADD COMMENT
0
Entering edit mode
@joern-toedling-1244
Last seen 10.3 years ago
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. > >
ADD COMMENT

Login before adding your answer.

Traffic: 668 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6