library(BCodifSIS) set.seed(42) X <- matrix(rnorm(30 * 6), nrow = 30, ncol = 6) y <- X[, 1] + 0.25 * rnorm(30) fast <- bcodif_score(X[, 1], y) slow <- bcodif_score_slow(X[, 1], y) stopifnot(isTRUE(all.equal(fast, slow, tolerance = 1e-10))) fit <- bcodif_sis(X, y, d = 3) stopifnot(inherits(fit, "bcodif_sis")) stopifnot(length(fit$ix) == 3) stopifnot(all(is.finite(fit$scores))) qc <- quick_check() stopifnot(is.list(qc)) stopifnot(qc$score_difference < 1e-10)