简体   繁体   中英

Export data from R into Excel

I'm trying to export some results obtained from R into Excel unsuccesfully. I have tried the following codes:

write.table(ALBERTA1, "D:/ALBERTA1.txt", sep="\t")
write.csv(ALBERTA1,":\ALBERTA1.csv")
your_filename_in_R = read.csv("ALBERTA1.csv")
your_filename_in_R = read.csv("ALBERTA1.csv")
write.csv(df, file = "ALBERTA1.csv")
your_filename_in_R = read.csv("ALBERTA1.csv")
write.csv(ALBERTA1, "ALBERTA1.csv")
write.table(ALBERTA1, 'clipboard', sep='\t')
write.table(ALBERTA1,"ALBERTA1.txt")
write.table(as.matrix(ALBERTA2),"ALBERTA2.txt")
write.table(as.matrix(vecm.pred$fcst$Alberta_Females[,1]),"vecm.pred$fcst$Alberta_Females[,1].txt")
write.table(as.matrix(foo),"foo.txt")
write.xlsx(ALBERTA2, "/ALBERTA2.xlsx")
write.table(ALBERTA1, "D:/ALBERTA1.txt", sep="\t").

But my data from excel file is still messed up togheter and consequently i can't operate any computations. the two data are inside the same colums. the Please can you suggest me some other functions? 在此处输入图片说明

What I did to manage the CSV data in Excel:

  1. In excel find "Data" in the top Menu
  2. Choose the "Text to Columns ..." in the middle area of the menu.
  3. follow the instruction and then you get the data in columns

https://superuser.com/questions/364555/how-to-break-a-spreadsheet-containing-csv-into-multiple-columns

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM