Plot the annual random effects predictions by year for the fit model

map_year_re(predictions, dir, nrow = 3, ncol = 4, verbose = FALSE)

Arguments

predictions

A data frame of predictions made by sdmTMB using the predict function based on the newdata prediction grid passed to the spatial, and spatio-temporal based on the fit model estimates.

dir

A directory location where results and figures will be saved.

nrow

The number of rows to plot for multi-year figures.

ncol

The number of columns to plot for multi-year figures.

verbose

A logical that specifies if you want to print messages and warnings to the console. The default is FALSE.

Author

Chantel R. Wetzel

Examples

if (FALSE) { # \dontrun{
predictions <- predict(
  fit,
  newdata = prediction_grid
)
predictions[, c("lon", "lat")] <- round(predictions[, c("Lon", "Lat")], 1)
map_year_re(
  predictions = predictions,
  dir = file.path(sppdir, survey, "index", obs)
)
} # }