cleanup_by_species.RdFilter catch by species, create a vector of tows and give tows a random assignment to be resampled,
cleanup_by_species(
catch,
spp_info,
seq_from = 0.1,
seq_to = 1,
seq_by = 0.1,
tot_dataframes = 91,
replicate_num = 10
)full catch df
A data frame containing information about the test species.
A numeric value specifying the start of the sequence for data frames.
A numeric value specifying the end of the sequence for data frames.
A numeric value specifying the step size of the sequence for data frames.
the number of data frames you want to output. effort x replicates - (replicates - 1). 5x3-2
An integer specifying the number of replicates.
List of resampled catch dataframes
catch <- surveyresamplr::noaa_nwfsc_catch
spp_list <- data.frame(
srvy = "CA",
common_name = "arrowtooth flounder",
file_name = "arrowtooth_flounder",
filter_lat_gt = 34,
filter_lat_lt = NA,
filter_depth = NA,
model_fn = "total_catch_wt_kg ~ 0 + factor(year) + pass",
model_family = "delta_gamma",
model_anisotropy = TRUE,
model_spatiotemporal = "iid, iid"
)
cleanup_by_species(
catch = catch,
spp_info = spp_info,
seq_from = 0.1,
seq_to = 1,
seq_by = 0.1,
tot_dataframes = 91,
replicate_num = 10
)
#> Error in dplyr::filter(catch, common_name == spp_info$common_name): ℹ In argument: `common_name == spp_info$common_name`.
#> Caused by error:
#> ! object 'spp_info' not found