# Throttle CPU threads if R CMD check (for CRAN) if (any(grepl("_R_CHECK", names(Sys.getenv()), fixed = TRUE))) { cat("Throttling threads") # fixest if ( requireNamespace("fixest", quietly=TRUE) ){ library(fixest) setFixest_nthreads(1) } # data.table if(requireNamespace("data.table", quietly = TRUE)){ library(data.table) setDTthreads(1) } } # Run tinytest suite if ( requireNamespace("tinytest", quietly=TRUE) ){ # Run tests tinytest::test_package("ggfixest") }