inst/skills/build-model/quick-reference.md

# ── Build ─────────────────────────────────────────────────────────────────────
species_params <- read.csv(
    system.file("extdata", "NS_species_params.csv", package = "mizer"))
params <- newMultispeciesParams(species_params)
params <- newTraitParams()  # or newCommunityParams(), newSingleSpeciesParams()

# ── Inspect ───────────────────────────────────────────────────────────────────
summary(params)
species_params(params)      # given + calculated, one row per species
interaction_matrix(params)  # the interaction matrix
gear_params(params)         # the fishing gears
resource_params(params)     # the resource scalars

# ── Save / reload ─────────────────────────────────────────────────────────────
params <- setMetadata(params, title = "Celtic Sea model", ...)
saveParams(params, "model.rds")
params <- readParams("model.rds")
saveSim(sim, "sim.rds")
sim <- readSim("sim.rds")


Try the mizer package in your browser

Any scripts or data that you put into this service are public.

mizer documentation built on Aug. 31, 2026, 5:08 p.m.