glmnet
Lasso and Elastic-Net Regularized Generalized Linear Models
Description
Extremely efficient procedures for fitting the entire lasso or elastic-net regularization path for linear regression, logistic and multinomial regression models, Poisson regression, Cox model, multiple-response Gaussian, and the grouped multinomial regression; see <doi:10.18637/jss.v033.i01> and <doi:10.18637/jss.v039.i05>. There are two new and important additions. The family argument can be a GLM family object, which opens the door to any programmed family (<doi:10.18637/jss.v106.i01>). This comes with a modest computational cost, so when the built-in families suffice, they should be used instead. The other novelty is the relax option, which refits each of the active sets in the path unpenalized. The algorithm uses cyclical coordinate descent in a path-wise fashion, as described in the papers cited.
Downloads
150.5K
Last 30 days
282nd
478.7K
Last 90 days
2.2M
Last year
Trend: -4.1% (30d vs prior 30d)
CRAN Check Status
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | NOTE |
| r-devel-linux-x86_64-debian-gcc | NOTE |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | NOTE |
| r-oldrel-macos-arm64 | NOTE |
| r-oldrel-macos-x86_64 | NOTE |
| r-oldrel-windows-x86_64 | ERROR |
| r-patched-linux-x86_64 | NOTE |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (7 non-OK)
compiled code
File ‘glmnet/libs/glmnet.so’: Found non-API call to R: ‘R_UnboundValue’ Compiled code should not call non-API entry points in R. See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual, and section ‘Moving into C API compliance’ for issues with the use of non-API entry points.
compiled code
File ‘glmnet/libs/glmnet.so’: Found non-API call to R: ‘R_UnboundValue’ Compiled code should not call non-API entry points in R. See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual, and section ‘Moving into C API compliance’ for issues with the use of non-API entry points.
compiled code
File 'glmnet/libs/x64/glmnet.dll': Found non-API call to R: 'R_UnboundValue' Compiled code should not call non-API entry points in R. See 'Writing portable packages' in the 'Writing R Extensions' manual, and section 'Moving into C API compliance' for issues with the use of non-API entry points.
installed package size
installed size is 33.9Mb
sub-directories of 1Mb or more:
libs 31.9Mb
installed package size
installed size is 35.5Mb
sub-directories of 1Mb or more:
libs 33.6Mb
re-building of vignette outputs
Error(s) in re-building vignettes: --- re-building 'Coxnet.Rmd' using rmarkdown ! Package pdftex.def Error: File `25f5321870be33d7b7d4f5c6b4cc241bf6e3466b.pdf' not found: using draft setting. Error: processing vignette 'Coxnet.Rmd' failed with diagnostics: LaTeX failed to compile D:/RCompile/CRANpkg/local/4.4/glmnet.Rcheck/vign_test/glmnet/vignettes/Coxnet.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See Coxnet.log for more info. --- failed re-building 'Coxnet.Rmd' --- re-building 'glmnet.Rmd' using rmarkdown ! Package pdftex.def Error: File `7b1f18dee03b8db953d29648bd152e578f83d189.pdf' not found: using draft setting. Error: processing vignette 'glmnet.Rmd' failed with diagnostics: LaTeX failed to compile D:/RCompile/CRANpkg/local/4.4/glmnet.Rcheck/vign_test/glmnet/vignettes/glmnet.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See glmnet.log for more info. --- failed re-building 'glmnet.Rmd' --- re-building 'glmnetFamily.Rmd' using rm ...[truncated]... 96ad59121a1121ba73.png' not found: using draft setting. Error: processing vignette 'glmnetFamily.Rmd' failed with diagnostics: LaTeX failed to compile D:/RCompile/CRANpkg/local/4.4/glmnet.Rcheck/vign_test/glmnet/vignettes/glmnetFamily.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See glmnetFamily.log for more info. --- failed re-building 'glmnetFamily.Rmd' --- re-building 'relax.Rmd' using rmarkdown ! Package pdftex.def Error: File `7957f5b5ba07fd52cd1e9116b04e015ece34e133.pdf' not found: using draft setting. Error: processing vignette 'relax.Rmd' failed with diagnostics: LaTeX failed to compile D:/RCompile/CRANpkg/local/4.4/glmnet.Rcheck/vign_test/glmnet/vignettes/relax.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See relax.log for more info. --- failed re-building 'relax.Rmd' SUMMARY: processing the following files failed: 'Coxnet.Rmd' 'glmnet.Rmd' 'glmnetFamily.Rmd' 'relax.Rmd' Error: Vignette re-building failed. Execution halted
compiled code
File ‘glmnet/libs/glmnet.so’: Found non-API call to R: ‘R_UnboundValue’ Compiled code should not call non-API entry points in R. See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual, and section ‘Moving into C API compliance’ for issues with the use of non-API entry points.
Check History
ERROR 9 OK · 4 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 30, 2026
compiled code
File ‘glmnet/libs/glmnet.so’: Found non-API call to R: ‘R_UnboundValue’ Compiled code should not call non-API entry points in R. See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual, and section ‘Moving into C API compliance’ for issues with the use of non-API entry points.
compiled code
File ‘glmnet/libs/glmnet.so’: Found non-API call to R: ‘R_UnboundValue’ Compiled code should not call non-API entry points in R. See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual, and section ‘Moving into C API compliance’ for issues with the use of non-API entry points.
installed package size
installed size is 33.9Mb
sub-directories of 1Mb or more:
libs 31.9Mb
installed package size
installed size is 35.5Mb
sub-directories of 1Mb or more:
libs 33.6Mb
re-building of vignette outputs
Error(s) in re-building vignettes: --- re-building 'Coxnet.Rmd' using rmarkdown ! Package pdftex.def Error: File `25f5321870be33d7b7d4f5c6b4cc241bf6e3466b.pdf' not found: using draft setting. Error: processing vignette 'Coxnet.Rmd' failed with diag ...[truncated]... ging for debugging tips. See relax.log for more info. --- failed re-building 'relax.Rmd' SUMMARY: processing the following files failed: 'Coxnet.Rmd' 'glmnet.Rmd' 'glmnetFamily.Rmd' 'relax.Rmd' Error: Vignette re-building failed. Execution halted
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
installed package size
installed size is 33.9Mb
sub-directories of 1Mb or more:
libs 31.9Mb
installed package size
installed size is 35.5Mb
sub-directories of 1Mb or more:
libs 33.6Mb