加载Stata 13和Rdata文件时出现问题。新问题

时间:2017-06-23 02:07:16

标签: r stata

今天早上我正在处理一些数据,R冻结了。我重新启动,无法再加载数据。我不确定是怎么回事。我花了好几个小时。我试过Rstudio,它的工作方式有点儿。并非我的所有代码都转移到Rstudio中的函数。我宁愿让它在常规R控制台中工作。

我正在跑步

R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

MAC OSX 10.12.5

数据可以在这里找到: http://www.worldvaluessurvey.org/WVSDocumentationWV5.jsp

我没有使用集成数据,因为我分别运行两个波 - 我不需要每一波。

setwd('~/Desktop/')
dat1 <- read.dta13('WV5_data_stata_V_2015_04_18.dta')
#File not found.

dat1 <- read.dta13('WV5_data_stata_V_2015_04_18.dta',convert.factors = TRUE, generate.factors = FALSE, encoding = "UTH-8", fromEncoding =NULL, convert.underscore = FALSE, missing.type = FALSE, convert.dates = TRUE, replace.strl = TRUE, add.rownames = FALSE, nonint.factors = FALSE, select.rows = NULL)
#File not found.

dat1 <- read.dta13('~/Desktop/WV5_data_stata_V_2015_04_18.dta')
#File not found.

dat1 <- read.dta13('WV5_data_stata_V_2015_04_18.dta',convert.factors = TRUE, generate.factors = FALSE, encoding = "UTH-8", fromEncoding =NULL, convert.underscore = FALSE, missing.type = FALSE, convert.dates = TRUE, replace.strl = TRUE, add.rownames = FALSE, nonint.factors = FALSE, select.rows = NULL)
#File not found.

dat1 <- read.dta13('~/Desktop/WV5_data_stata_V_2015_04_18.dta',convert.factors = TRUE, generate.factors = FALSE, encoding = "UTH-8", fromEncoding =NULL, convert.underscore = FALSE, missing.type = FALSE, convert.dates = TRUE, replace.strl = TRUE, add.rownames = FALSE, nonint.factors = FALSE, select.rows = NULL)
#File not found.

dat<- load("WV5_Data_R_v_2015_04_18 2.rdata")
class(dat)
#[1] "character"

#Your version of R is up to date

0 个答案:

没有答案