由于命名空间错误,R无法加载软件包预测
我尝试安装所有依赖软件包,并尝试使用另一个帖子中建议的另一个回购源。由于命名空间错误,R无法加载软件包预测
[R 3.2.0版本的x64
install.packages("fracdiff")
install.packages("Rcpp")
install.packages("RcppArmadillo")
install.packages("colorspace")
install.packages("forecast", dep=T)
install.packages("forecast", repos=c("http://cran.rstudio.com"),dep=T)
library("forecast")
然后我得到
Loading required package: zoo
Attaching package: ‘zoo’
The following objects are masked from ‘package:base’:
as.Date, as.Date.numeric
Loading required package: timeDate
Error : .onAttach failed in attachNamespace() for 'forecast', details:
call: fun(libname, pkgname)
error: 4 arguments passed to .Internal(nchar) which requires 3
In addition: Warning message:
package ‘forecast’ was built under R version 3.2.1
Error: package or namespace load failed for ‘forecast’
sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] Hmisc_3.16-0 ggplot2_1.0.1 Formula_1.2-1 survival_2.38-1 lattice_0.20-31 zoo_1.7-12 timeSeries_3012.99 timeDate_3012.100
loaded via a namespace (and not attached):
[1] Rcpp_0.11.6 cluster_2.0.1 magrittr_1.5 MASS_7.3-41 splines_3.2.0 forecast_6.1 munsell_0.4.2
[8] colorspace_1.2-6 quadprog_1.5-5 stringr_1.0.0 plyr_1.8.3 tools_3.2.0 nnet_7.3-9 parallel_3.2.0
[15] gtable_0.1.2 latticeExtra_0.6-26 tseries_0.10-34 digest_0.6.8 gridExtra_0.9.1 RColorBrewer_1.1-2 reshape2_1.4.1
[22] acepack_1.3-3.3 rpart_4.1-9 fracdiff_1.4-2 stringi_0.4-1 scales_0.2.5 foreign_0.8-63 proto_0.3-10
我试图重现。我没有收到有关加载timeDate或您看到的错误的消息。我确实收到关于加载pkg:zoo的消息。该软件包加载并公布其版本号。尝试更新至R版本3.2.1,因为这是一个新的参数nchar
介绍:
new$Text[ grep("nchar", news$Text) ]
• nchar(x, *) and nzchar(x) gain a new argument keepNA which governs how the result for NAs in x is determined. For the R 3.2.x series, the default remains FALSE which is fully back compatible. From R 3.3.0, the default will change to keepNA = NA and you are advised to consider this for code portability.
更新到3.2.1解决了问题 – user670186
得到了完全相同的问题。从R 3.2.0升级到3.2.1解决了这个问题。 – Andries
得到“错误:传递给.Internal(nchar)的4个参数需要3”试图使用'raster'包并从3.2.0升级到3.2.1以解决此问题。 – aaryno
我怀疑的版本不匹配。你应该确保你已经将你的所有软件包更新到他们当前的版本(并且停止对'TRUE'使用'T')。如果所有的失败,我建议发布输出从'sessionInfo()' –
DId,但它并没有帮助 – user670186
@BondedDust我aded sessionInfo() – user670186