使用包中的Boot
功能时,car
我收到错误消息
Error in get(".y.boot", envir = .carEnv) : object '.carEnv' not found
我怀疑我无意中更改/设置了我的操作系统中的某些内容,并且不知道它可能是什么。运行下面的代码会在我的桌面上返回错误,但在运行相同操作系统 (Yosemite) 的笔记本电脑以及运行 Windows 7 的桌面上运行时没有错误(全部使用 R-3.1.2)。触发消息的代码是
library(car)
swiss.lm <- lm(Fertility ~ Education, data = swiss)
BC <- Boot(swiss.lm, R = 999, method = "case") # No Problems
BR <- Boot(swiss.lm, R = 999, method = "residual") # Problems now
Error in get(".y.boot", envir = .carEnv) : object '.carEnv' not found
我已经重新安装了 R 但运行上述代码时仍然出现错误。任何关于我所做的事情以及如何让代码运行和找到环境的建议都将不胜感激。蒂亚!
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] car_2.0-24
loaded via a namespace (and not attached):
[1] boot_1.3-15 grid_3.1.2 lattice_0.20-29 lme4_1.1-7 MASS_7.3- 37 Matrix_1.1-5
[7] mgcv_1.8-4 minqa_1.2.4 nlme_3.1-119 nloptr_1.0.4 nnet_7.3-9 parallel_3.1.2
[13] pbkrtest_0.4-2 quantreg_5.11 Rcpp_0.11.4 SparseM_1.6 splines_3.1.2 tools_3.1.2