Function to create a mesh, fit the GAM model, and get the index. TOLEDO: need to build out, this is just a holding spot Exports fit.rds and index.rds files to the designated species folder. Learn more: https://github.com/casperwberg/surveyIndex

wrapper_surveyIndex(x, y, z, dir_spp, spp_info, n_knots = 500)

Arguments

x

speciesname_df[[i]] which is a data frame from a list of data frames created from the cleanup_by_species() function and any further post-processing of depth filters (see the smaller_function.R file for those).

y

speciesname_files[[i]] which is an item in a list created from

z

A dataframe with the new data to predict on.

dir_spp

A character string specifying the directory for output files.

spp_info

information about the species test run.

n_knots

Numeric. Default = 500. names(speciesname_df)

Examples

if (FALSE) { # \dontrun{
wrapper_surveyIndex() # TO DO: NEED EXAMPLE OF HOW TO USE
} # }