Newbie question. Am attempting to import a number of datasets that have been placed in the 'data' folder of my working directory. When attempting to execute numerous dataset loading functions eg read_csv, read.xlsx I'm getting the same error message that the 'File does not exist'. The commands are being run out of a .RMD script. The file names are correct. Correct libraries are loaded readxl, readr, openxlsx etc
An example of the code is:
The working directory is correct and I've amended the working directory through RStudio and through setwd(). When I change the wd to the 'data' and remove 'data/' from the above script it loads fine. Am running RStudio 4.0.5 on macOS 11.5.2. Have exited and restarted with a new session.
ok, nothing suspicious there.
How about making your script print out where it thinks the working directory is. i.e. print(getwd())
what the contents are i.e. you can use list.dirs()
additionally you can use file.exists() to check for mere existance file.access() to check permissions on an existant file, using mode 4, for read access
like
file.access("x.Rdata",4)
if result is zero you have access if -1 , then you dont