简体   繁体   English

R无法打开wording目录下的任何文件

[英]R cannot open any file in the wording directory

I tried to import csv data to R as usual.我尝试像往常一样将 csv 数据导入 R。 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.但是,我发现 R 在此工作目录中找不到任何文件。

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.我检查了getwd() ,它显示了正确的工作目录。 Also checked through list.files() , and the file is in the list.还通过list.files()检查,文件在列表中。

Please try to use a full path, such as:请尝试使用完整路径,例如:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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