[英]Error: 'glmnet_softmax' is not an exported object from 'namespace:glmnet'
I am trying to use this tutorial https://github.com/wvictor14/planet#infer-ethnicity and get the following error message, even when using the test data provided:我正在尝试使用本教程https://github.com/wvictor14/planet#infer-ethnicity并收到以下错误消息,即使使用提供的测试数据:
pl_infer_ethnicity(pl_betas)
[1] "1860 of 1860 predictors present."
Loading required package: Matrix
Error: 'glmnet_softmax' is not an exported object from 'namespace:glmnet'
I've tried re-installing individual packages and running in a new version or R and get the same error.我试过重新安装单个软件包并在新版本或 R 中运行并得到相同的错误。 I believe this is related to other errors posted with a recent update in glmnet.
我相信这与 glmnet 中最近更新发布的其他错误有关。 Any tips on how to resolve?
有关如何解决的任何提示?
sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Matrix_1.2-18 planet_0.1.0
loaded via a namespace (and not attached):
[1] lattice_0.20-38 codetools_0.2-16 glmnet_3.0-2 foreach_1.4.7
[5] crayon_1.3.4 grid_3.6.2 magrittr_1.5 pillar_1.4.2
[9] rlang_0.4.2 remotes_2.1.0 iterators_1.0.12 tools_3.6.2
[13] compiler_3.6.2 pkgconfig_2.0.3 shape_1.4.4 tibble_2.1.3
I don't know why it would have worked in the first place;我不知道为什么它首先会起作用; the NEWS file for
glmnet
doesn't say anything one way or the other about glmnet_softmax
(eg, it does not say " glmnet_softmax
is no longer exported" or anything like that ...) glmnet
的 新闻文件并没有以一种或另一种方式说明glmnet_softmax
(例如,它没有说“ glmnet_softmax
不再导出”或类似的东西......)
In any case, this is a non-exported function from the glmnet
package.无论如何,这是来自
glmnet
包的非导出函数。 It is referred to here in the tutorial code.它在教程代码中被引用到这里。
If you can change that line of code to refer to glmnet:::glmnet_softmax
(ie, three colons rather than two), that should suffice ( :::
allows you to access a non-exported function).如果您可以更改该行代码以引用
glmnet:::glmnet_softmax
(即三个冒号而不是两个冒号),那就足够了( :::
允许您访问非导出函数)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.