Thin wrapper around assemble_matrices() that standardises and stores the
assembled inputs in an invasimapr_fit object for downstream modelling.
Use this to run the input-assembly step once and pass a single structured
object through subsequent pipelines.
Arguments
- make_plots
logical. If
TRUE, propagatemake_plotstoassemble_matrices()so that diagnostic plots are produced during assembly. Defaults toFALSE.
Value
An object of class invasimapr_fit with components:
inputsThe full list returned by
assemble_matrices().metaA list with
n_sites,n_residents,n_traits.
Details
What this does
Calls
assemble_matrices()to build core site × species/trait matrices, perform consistency checks, and harmonise keys and factor levels.Wraps the returned list (
core) into a lightweight S3 containerinvasimapr_fitwith a dedicatedinputsslot and a smallmetablock (counts of sites, residents, traits) used by later steps.
Object layout
invasimapr_fit
├─ inputs : <list> # output from assemble_matrices()
└─ meta : <list> # n_sites, n_residents, n_traitsNotes
No mutation of the
coreobject occurs here; this function only packages and annotates it.If you need to inspect the assembled inputs, use
fit$inputsafter return.
See also
Container constructor:
new_invasimapr_fit()
