[英]cannot open file 'test.csv': No such file or directory Error in file(file, “rt”) : cannot open the connection
I'm having issues reading the data on the desktop version of Rstudio on mac.我在 Mac 上读取 Rstudio 桌面版本的数据时遇到问题。 When I do the usual read.csv it shows the error shown in the title.
当我执行通常的 read.csv 时,它会显示标题中显示的错误。 This is the first time this has happened.
这是第一次发生这种情况。 I have tried to change my working directory in 'Sessions' at the top and also to read the file with its granularity
我试图在顶部的“会话”中更改我的工作目录,并以它的粒度读取文件
You could try rstudioapi
library to set an unique wd for your script path and then use read.csv()
where path= "test.csv"
您可以尝试
rstudioapi
库为您的脚本路径设置一个唯一的 wd,然后使用read.csv()
where path= "test.csv"
library(rstudioapi)
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
Test <- read.csv("test.csv")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.