Hi,
I am trying to load .csv datasets into RStudio, but I am getting an error message stating that the file does not exist. Does anyone have a solution?
Thank you!
Heather
Hi,
I am trying to load .csv datasets into RStudio, but I am getting an error message stating that the file does not exist. Does anyone have a solution?
Thank you!
Heather
Try typing in the entire file path. On my Windows 10 system, that would look like
DF <- read.csv("C:/Users/fjcc/Documents/R/CoolData.csv")
If the file is in your HOME directory or a sub folder of that, you can simplify the path with the ~ symbol. You can find your HOME directory like this
Sys.getenv("HOME")
[1] "C:/Users/fjcc/Documents"
That tells me that the read.csv() can be written as
DF <- read.csv("~/R/CoolData.csv")
Other way is use file.choose()
function
file.choose()
open a new window and search the file and press open. Next, the console show the path of this file.
file.choose()
# You can copy and paste this result in
Datos<- read.csv("")
This topic was automatically closed 21 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.