在 R 中加载 Lime 包时出错 "object ‘coef.cv.glmnet’ is not exported by 'namespace:glmnet' " -

error "object ‘coef.cv.glmnet’ is not exported by 'namespace:glmnet' " while loading Lime package in R -

我已经在 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()
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

glmnet 最近的主要更新(现在不再导出 coef.cv.glmnet)似乎已经损坏了石灰。您可以在 CRAN tests. You can expect a fix by the package maintainer soon (or the package will be archived by CRAN). See also this bug report and the answer by the maintainer:

中看到具有相同原因的错误

This is due to a recent breaking change in glmnet—lime will be updated soon to fix this