[R] How to convert .Rdata file into .csv or something else?

John Kane jrkrideau at yahoo.ca
Thu Aug 17 11:15:43 CEST 2017


Welcome to the forum
.Rdata may contain many different objects.
I would suggest doing a  "ls()" to see what objects you have.
then have a look at ?write.table or ?write.csvThese commands will write many types of objects to a .csv file. 
For example if I have a data.frame called "dat1" I can write it to a csv (text) file like this:
write.csv(dat1, "~/Rjunk/mydata.csv")


On Thursday, August 17, 2017, 4:10:36 AM EDT, y tanaka <marineband2007 at gmail.com> wrote:

Dear mailing list members,

I am a beginner of this community.

I would like to analyze data in a .rdata file.
I ran the following code, but the object "d" remained empty.

d <- load("~/docdis/input/ch2/WV6_Data_R_v_2016_01_01.rdata")

I would like to know how to convert this file format into .csv or .txt.
I suppose this question is very basic, but I could not find solutions on
internet or in my textbooks.
I would appreciate it if someone would help me.

Yohei Tanaka (Tohoku University)

    [[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

	[[alternative HTML version deleted]]



More information about the R-help mailing list