Error in `get(name, envir = envir)`: object 'glmnet' not found

`%||%` <- function(x, y) if (is.null(x)) y else x
test_that("stabpath returns a coherent matrix path", {
pr <- 1/(1+exp(-scale(drop(x %*% beta))))
y <- factor(rbinom(n, 1, pr), levels = c(0,1))
sp <- c060::stabpath(y = y, x = x, steps = 20L, weakness = 1, family = "binomial")
expect_equal(nrow(sp$stabpath), p)      # rows are features
expect_true(ncol(sp$stabpath) >= 1)     # columns ~ lambda grid
test_that("stabsel selects variables at or above threshold (may be empty)", {
y <- factor(rbinom(n, 1, 1/(1+exp(-eta))), levels = c(0,1))
sp <- stabpath(y = y, x = x, steps = 20L, weakness = 1, family = "binomial")
ss <- stabsel(sp, error = 0.05, type = "pfer", pi_thr = 0.6)
ph <- sp$stabpath[, ss$lpos, drop = TRUE]
succeed("No variables crossed threshold in this tiny run (acceptable)")

"stabpath returns a coherent matrix path"
"stabsel selects variables at or above threshold (may be empty)"
"No variables crossed threshold in this tiny run (acceptable)"

stabsel selects variables at or above threshold (may be empty)