简体   繁体   中英

R cannot open any file in the wording directory

I tried to import csv data to R as usual. I am pretty sure that I have set the correct directory. However, I found that R could not find any file in this working directory.

This is the error,

Warning in file(file, "rt") :
  cannot open file 'daily-min-temperatures.csv': No such file or directory
Error in file(file, "rt") : cannot open the connection

I checked getwd() , and that shows the correct working directory. Also checked through list.files() , and the file is in the list.

Please try to use a full path, such as:

read.csv("C:/Users/username/Documents/daily-min-temperatures.csv")

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