在R中加载Lime软件包时出现错误“对象'coef.cv.glmnet'未由'namespace:glmnet'导出”-

时间:2019-11-12 06:16:17

标签: r lime

我已经在R中成功安装了Lime(和glmnet),但是当我尝试加载它时却收到错误消息:

> require(lime)
Loading required package: lime
Error: package or namespace load failed for ‘lime’:
 object ‘coef.cv.glmnet’ is not exported by 'namespace:glmnet'

在线搜索,似乎无法找到解决方案。 这是我的sessioninfo()

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] glmnet_3.0    Matrix_1.2-17

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3       rstudioapi_0.10  magrittr_1.5     tidyselect_0.2.5 munsell_0.5.0    colorspace_1.4-1 lattice_0.20-38  R6_2.4.0         rlang_0.4.1     
[10] foreach_1.4.7    dplyr_0.8.3      tools_3.6.1      grid_3.6.1       gtable_0.3.0     iterators_1.0.12 lazyeval_0.2.2   assertthat_0.2.1 tibble_2.1.3    
[19] crayon_1.3.4     purrr_0.3.3      ggplot2_3.2.1    codetools_0.2-16 shape_1.4.4      glue_1.3.1       compiler_3.6.1   pillar_1.4.2     scales_1.0.0    
[28] pkgconfig_2.0.3 

我已经更新了我所有的包裹。 glmnet成功加载

> library(glmnet)
Loaded glmnet 3.0

1 个答案:

答案 0 :(得分:2)

最近的glmnet重大更新(现在不再输出coef.cv.glmnet)似乎已经破烂了。您可以在CRAN tests中看到具有相同原因的错误。您可以期待软件包维护者的修复(否则该软件包将由CRAN存档)。另请参见this bug report and the answer by the maintainer

  

这是由于glmnet最近发生了重大变化,石灰将很快更新以解决此问题