安装了glmnet之后,运行library(glmnet)出错
library(glmnet)
Error: package or namespace load failed for ‘glmnet’ in 1:(nrow(u5) - 1):
argument of length 0
我的解答思路和尝试过的方法
卸载glmnet后,重新安装,仍然会有这个错误。
更改路径
.libPaths("C:\Program Files\R\R-4.2.1\library"),仍然报错。
非常顽固的错误!
我的版本信息:
sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Matrix_1.4-1 ncvreg_3.13.0
loaded via a namespace (and not attached):
[1] lattice_0.20-45 codetools_0.2-18 foreach_1.5.2 grid_4.2.1 iterators_1.0.14 tools_4.2.1
[7] compiler_4.2.1