简体   繁体   English

无法打开文件'test.csv':没有这样的文件或目录文件中的错误(文件,“rt”):无法打开连接

[英]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.

相关问题 文件中的错误(文件,“rt”):无法打开连接另外:警告消息:在文件(文件,“rt”)中:无法打开文件 - Error in file(file, “rt”) : cannot open the connection In addition: Warning message: In file(file, “rt”) : cannot open file 文件错误(文件,“rt”):无法打开连接 - Shiny - Error in file(file, "rt") : cannot open the connection - Shiny 文件中出现错误(文件,“rt”):无法打开连接 - Getting error in file(file, "rt"): cannot open the connection 在文件(文件,“ rt”)中出现错误:无法打开连接 - Getting Error in file(file, “rt”) : cannot open the connection 文件错误(文件,“rt”):无法打开连接(寻找其他解决方案) - Error in file(file, "rt") : cannot open the connection (looking for another solution) 文件错误(文件,“rt”):无法在 r 中打开连接 - Error in file(file, “rt”) : cannot open the connection in r 文件错误(文件,“rt”):无法打开连接 - 无法打开文件&#39;specdata&#39;访问被拒绝 - Error in file(file, “rt”) : cannot open the connection - cannot open file 'specdata' access denied JAGS,rjags:“文件错误(modfile,”rt“):无法打开连接” - JAGS, rjags: “Error in file(modfile, ”rt“) : cannot open the connection” 从 Internet 上读取 zip 文件:open.connection 中的错误(文件,“rt”):无法打开连接 - Reading zip file off the internet: Error in open.connection(file, “rt”) : cannot open the connection R-saemixData函数在函数环境中找不到数据“文件错误(文件,“ rt”):无法打开连接” - R - saemixData function do not find data in a function environment “Error in file(file, ”rt“) : cannot open the connection”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM