[英]Opening Rdata file on R
I have some trouble to open Rdata files on Rstudio. 我在Rstudio上打开Rdata文件时遇到了一些麻烦。
I tried different directory. 我尝试了其他目录。
I tried the load()
function. 我尝试了
load()
函数。
I set up the file pathway with setwd()
. 我使用
setwd()
设置了文件路径。
I made sure that the file pathway did not contain spaces or accent or particular character in it. 我确保文件路径中不包含空格,重音符号或特定字符。
I tried the function load(file.choose())
. 我尝试了功能
load(file.choose())
。
The file is 8.4 Mb (so not empty). 该文件为8.4 Mb(因此不能为空)。
But it keeps saying: 但它一直在说:
"Object is not found"
“找不到对象”
It is downloaded from the internet but when I try load(url())
it says: 它是从Internet下载的,但是当我尝试
load(url())
它说:
"cannot open the connection", however I do have internet connection.
“无法打开连接”,但是我确实有Internet连接。 It also says "status was 'Couldn't connect to server' ".
它还说“状态为'无法连接到服务器'”。
Any thoughts ? 有什么想法吗 ? Any ideas to solve the problem would be greatly appreciated.
解决问题的任何想法将不胜感激。
Try using the full path to locate the file. 尝试使用完整路径查找文件。
C:/Downloads/thedata.RData
C:/Downloads/thedata.RData
file.exists("C:/Downloads/thedata.RData")
file.exists("C:/Downloads/thedata.RData")
load("C:/Downloads/thedata.RData")
load("C:/Downloads/thedata.RData")
file.exists()
is FALSE then the file was not reachable. file.exists()
为FALSE,则该文件不可访问。 Try moving it to another place and try again The error you get is Object not found
. 您得到的错误是
Object not found
。 This error message doesn't seem to be used within the load()
function. 在
load()
函数中似乎未使用此错误消息。 It can occur if the file-path is missing the surrounding quotes. 如果文件路径缺少引号,则会发生这种情况。
Maybe you forgot to quote the filename? 也许您忘了引用文件名了?
> load(myfile.RData)
Error in load(myfile.RData) : object 'myfile.RData' not found
加载错误(myfile.RData):找不到对象'myfile.RData'
> load("myfile.RData")
# Works without error.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.