tests/testthat/setup-minimal.R

# # Set all threading to 1 before any package loading
# Sys.setenv("R_DATATABLE_NUM_THREADS" = "1")
# Sys.setenv("OMP_NUM_THREADS" = "1")
# Sys.setenv("MKL_NUM_THREADS" = "1")
# 
# # Load packages one by one to identify the problematic one
# cat("Loading testthat...\n")
# library(testthat)
# 
# cat("Loading hedgehog...\n") 
# library(hedgehog)
# 
# # Try loading simstudy last and see if this is where it fails
# cat("Loading simstudy...\n")
# library(simstudy)
# 
# cat("Setting data.table threads...\n")
# if (requireNamespace("data.table", quietly = TRUE)) {
#   data.table::setDTthreads(1)
# }

# cat("Setup complete.\n")

Try the simstudy package in your browser

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

simstudy documentation built on Dec. 16, 2025, 5:06 p.m.