R Under development (unstable) (2026-07-17 r90265 ucrt) -- "Unsuffered Consequences" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # Regression test for audit item 1: > # bootnet() crashed on R >= 4.3 when `missing` was supplied without an explicit > # `type` argument, because the missing-handling check ran before match.arg(type), > # so `type != "parametric"` operated on the full choices vector and raised > # "length = 6 in coercion to logical(1)". > > library(bootnet) Loading required package: ggplot2 This is bootnet 1.9.1 For questions and issues, please see github.com/SachaEpskamp/bootnet. > > set.seed(1) > data <- as.data.frame(matrix(rnorm(50 * 4), nrow = 50, ncol = 4)) > colnames(data) <- paste0("V", 1:4) > > # Call bootnet() with `missing` supplied but NO `type` argument. > res <- tryCatch( + bootnet(data, default = "pcor", missing = "listwise", nBoots = 2, verbose = FALSE), + error = function(e) e + ) Note: bootnet will store only the following statistics: edge, strength, outStrength, inStrength > > # Must not raise the coercion error, and must actually succeed. > if (inherits(res, "error")) { + stop("bootnet() raised an error: ", conditionMessage(res)) + } > > stopifnot(inherits(res, "bootnet")) > > cat("test-item01-missing-arg.R passed\n") test-item01-missing-arg.R passed > > proc.time() user system elapsed 4.43 1.07 5.62