y tanaka
2017-Aug-18 10:54 UTC
[R] "How to convert .rdata file into .csv or something else?" [SOLVED:Corrected version2]
Dear mailing list members, Sorry for the repeated posting, but I have to add two more things. 1) I changed the .Rdata into .rdata in the subject to avoid misunderstanding of readers. 2) To save data in csv file;> write.csv(WV6_Data_R, "input/ch2/WV6_Data_R_v_2016_01_01.csv")Best regards, Yohei Tanaka ===========the following is the copy of my last message==========A member found a problem of lines of codes in my last e-mail. I submit the correction to this mailing list as follows. In the final part of my last e-mail message, a csv file is created. But, I cannot open this file, so please ignore the following part. ------------------------------------------------------------ -------------------------------------- If you want to create both csv file and an object directly from the file path;> library(R.utils) > saveObject(WV6_Data_R, "~/docdis/input/ch2/WV6_Data_R_v_2016_01_01.csv") > d <- loadObject("~/docdis/input/ch2/WV6_Data_R_v_2016_01_01.csv")------------------------------------------------------------ --------------------------------------- I am so sorry for my mistake. For your reference, I put the whole contents of my last e-mail message below. ------------------the following sentences are the previous message-------------- Thank you for all members who gave me advice. This question is solved. I tried to create an object using the load function by analogy based on the read.csv function like this;> d <- load("~/docdis/input/ch2/WV6_Data_R_v_2016_01_01.rdata")but, load function cannot be used in this way. Correct ways are;> load("~/docdis/input/ch2/WV6_Data_R_v_2016_01_01.rdata", verbose = TRUE)#You can find the name of the stored object is "WV6_Data_R" by setting verbose = TRUE Loading objects: .Traceback WV6_Data_R or> ls()[1] "d" "d2" "Howell1" "m4.1_logsigma" "m4.3" [6] "post" "sigma" "WV6_Data_R" Then,> d <- WV6_Data_R # the copy of WV6_Data_R is created in the object d-------------------------please ignore the following part-------------------------------------------------- If you want to create both csv file and an object directly from the file path;> library(R.utils) > saveObject(WV6_Data_R, "~/docdis/input/ch2/WV6_Data_R_v_2016_01_01.csv") > d <- loadObject("~/docdis/input/ch2/WV6_Data_R_v_2016_01_01.csv")------------------------------------------------------------ --------------------------------------------------------- Best regards, Yohei Tanaka =========================Yohei Tanaka Tohoku University Graduate school of Economics Doctoral student email: marineband2007 at gmail.com [[alternative HTML version deleted]]
Possibly Parallel Threads
- "How to convert .Rdata file into .csv or something else?" [SOLVED:Corrected version]
- "How to convert .Rdata file into .csv or something else?" [SOLVED]
- How to convert .Rdata file into .csv or something else?
- How to convert .Rdata file into .csv or something else?
- Quotation marks hinder for loop