MikeM
April 17, 2019, 12:54pm
1
Dear all,
I need to export my dataset "day" in Rstudio to an Excel file. I have done the following:
write_xlsx(x = day, path = "day.xlsx", col_names = TRUE)
Luckily, there is no error or warning, so it seems like it worked. But, I can not find the file anywhere on my computer. Can somebody help me with this? Did I do something wrong with the path (I have troubles understanding how paths work)?
Thanks in advance!
It should be in your working directory. Check in the directory returned by getwd()
FJCC
April 17, 2019, 1:20pm
3
It will be in your working directory. You can see what that is with the command
getwd()
You can also set the location where the file is written.
write.xlsx(df, "c:/users/fjcc/documents/R/dummy.xlsx", col_names = TRUE)
It is okay to use front slashes in the path even on a Windows system.
2 Likes
MikeM
April 17, 2019, 1:21pm
4
This was exactly what I needed to know and do. I found it!
Thank you so much!
system
Closed
April 24, 2019, 1:21pm
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.