简体   繁体   English

麻烦打开.Rdata文件

[英]Trouble opening .Rdata file

I'm attempting to pull metadata from the CCES . 我正在尝试从CCES中提取元数据。

When I download the file that's for R (.Rdata), then load it ( load("/Users/DanielEGreen/Downloads/CCES12_Common_VV.RData") ), it keeps saying "object is not found" . 当我下载R(.Rdata)的文件,然后加载它( load("/Users/DanielEGreen/Downloads/CCES12_Common_VV.RData") ),它一直说"object is not found"

I've moved it to various folders (eg, /Users/DanielEGreen/School/ etc. etc.) but nothing seems to budge. 我已将它移动到各种文件夹(例如,/ Users / DanielEGreen / School / etc等),但似乎没有任何让步。

In my g.environment, there is the data with 114,155 obs., yet 1 variable is shown which is RDX2. 在我的g.environment中,有114,155个障碍物的数据,但是显示了一个变量RDX2。

I am semi-new to R and metadata collecting; 我是R和元数据收集的半新手; I've pulled GSS info before but that's because you can download the .csv file and I know how to attach that directly to R. 之前我已经提取了GSS信息,但那是因为您可以下载.csv文件,我知道如何将其直接附加到R.

Loading data works fine for me using: 使用以下方法加载数据对我来说很好

df <- load("CCES12_Common_VV.RData")

Your RData is probably in a wrong directory. 您的RData可能位于错误的目录中。 If you don't use the full path then your file has to be in a working directory. 如果不使用完整路径,则文件必须位于工作目录中。 You can check your working directory with getwd() . 您可以使用getwd()检查您的工作目录。 Then you need to set the working directory to the folder where your RData file is with setwd() . 然后,您需要使用setwd()将工作目录设置为setwd()文件所在的文件夹。

Alternatively, you can specify the full path when loading the RData file. 或者,您可以在加载RData文件时指定完整路径。

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

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