resample_tests.RdThis function resamples species data frames, runs species distribution models (SDMs) in parallel, and saves the results.
resample_tests(
spp_dfs,
spp_info,
grid_yrs,
dir_out,
test = FALSE,
parallel = FALSE,
n_knots = 500,
model_type = "wrapper_sdmtmb"
)A list of species data frames.
A data frame containing information about the test species.
A data frame or list containing grid years information.
A character string specifying the directory for output files.
Logical. Default = FALSE. If TRUE, will only run first two resampling tests.
Logical. Default = FALSE. If TRUE, will run models using furrr::future_map().
Numeric. Default = 500.
String. Default = "wrapper_sdmtmb", but can be any preset wrapper_*() function or a premade home built function.
This function performs the following steps:
Sets up directories for output files.
Reduces the list of data frames to the last two entries for testing purposes.
Saves each data frame in Parquet format.
Sets up parallel processing using the furrr package.
Runs species distribution models (SDMs) in parallel.
Saves the results of the SDM processing into CSV files.
if (FALSE) { # \dontrun{
resample_tests() # TO DO: NEED EXAMPLE OF HOW TO USE
} # }