bestglm library not working

Hi

I have an issue with the bestglm package when i run the code below i get the message below. Anyone can help please? This code use to work fine.

## Load the bestglm package
library(bestglm)

## Apply best subset selection
bss_fit_AIC = bestglm(BreastCancer_scaled, family=binomial, IC="AIC")
bss_fit_BIC = bestglm(BreastCancer_scaled, family=binomial, IC="BIC")

bss_fit_AIC$Subsets
bss_fit_BIC$Subsets

The error message:

Error: package or namespace load failed for ‘bestglm’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘foreach’

You are missing this dependency, try installing it first

install.packages("foreach")
2 Likes

Wonderful. Thanks very much for your help as always.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.