tests/testthat/helpers-test-prep.R

suppressPackageStartupMessages(library(dplyr, quietly = TRUE))

# Just in case
set.seed(21451)

metabolite_network <- simulated_data %>%
    nc_standardize(starts_with("metabolite")) %>%
    nc_estimate_network(starts_with("metabolite"))

expect_correct_model_results <- function(.actual, .expected_metabolites) {
    expect_type(.actual, "list")
    expect_identical(class(.actual)[1], "tbl_df")
    expect_identical(sort(.actual$index_node),
                     sort(.expected_metabolites))
}

Try the NetCoupler package in your browser

Any scripts or data that you put into this service are public.

NetCoupler documentation built on June 8, 2025, 10:36 a.m.