【发布时间】:2018-02-26 12:56:12
【问题描述】:
这是我收到的代码和错误消息:
> library(caret)
Error : object ‘semester’ is not exported by 'namespace:lubridate'
Error: package or namespace load failed for ‘caret’
我正在使用 Mac。我也在 PC 上使用它,没有任何问题。
我还运行 sessionInfo() as adivsed
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X Yosemite 10.10.5
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lattice_0.20-34 factoextra_1.0.5 FactoMineR_1.36 e1071_1.6-8
[5] GGally_1.3.0 ggrepel_0.6.5 RColorBrewer_1.1-2 stringr_1.2.0
[9] tidyr_0.6.1 dplyr_0.7.3 data.table_1.10.4 ggplot2_2.2.1
loaded via a namespace (and not attached):
[1] reshape2_1.4.1 kernlab_0.9-25 splines_3.3.3
[4] colorspace_1.3-2 prodlim_1.6.1 survival_2.40-1
[7] rlang_0.1.2 ModelMetrics_1.1.0 glue_1.1.1
[10] bindrcpp_0.2 foreach_1.4.3 bindr_0.1
[13] plyr_1.8.4 lava_1.5 dimRed_0.1.0
[16] robustbase_0.92-7 timeDate_3012.100 munsell_0.4.3
[19] gtable_0.2.0 leaps_3.0 codetools_0.2-15
[22] class_7.3-14 DEoptimR_1.0-8 Rcpp_0.12.9
[25] scales_0.4.1 flashClust_1.01-2 ipred_0.9-6
[28] scatterplot3d_0.3-40 CVST_0.2-1 stringi_1.1.2
[31] RcppRoll_0.2.2 ddalpha_1.2.1 grid_3.3.3
[34] tools_3.3.3 magrittr_1.5 lazyeval_0.2.0
[37] tibble_1.3.4 cluster_2.0.5 DRR_0.0.2
[40] pkgconfig_2.0.1 MASS_7.3-45 Matrix_1.2-8
[43] lubridate_1.5.6 gower_0.1.2 assertthat_0.1
[46] reshape_0.8.6 iterators_1.0.8 R6_2.2.0
[49] rpart_4.1-10 nnet_7.3-12 nlme_3.1-131
【问题讨论】:
-
它看起来像一个依赖问题。在这种情况下,提供有关 R 设置和加载包的附加信息很有用。运行
sessionInfo()并使用其输出编辑您的帖子。这可以帮助人们找出导致错误的原因。 -
您可以尝试使用
install.packages("caret", dependencies = TRUE)安装caret,分享此步骤中遇到的任何错误 -
已添加 sessionInfo() 加载依赖项似乎不起作用。
-
尝试重新安装
lubridate首先,然后重新安装caret。如果这没有帮助:您的 R 版本(3.3.3)相当旧。我认为更新到最新的 R 然后更新这两个包将解决这个问题。
标签: r package r-caret failed-installation