Learn R Programming

mizer (version 1.0.1)

setBackground: Designate species as background species

Description

Background species are handled differently in some plots and their abundance is automatically adjusted in addSpecies() to keep the community close to the Sheldon spectrum.

Usage

setBackground(object, ...)

# S4 method for MizerParams setBackground(object, species = object@species_params$species)

# S4 method for MizerSim setBackground(object, species = object@params@species_params$species)

Arguments

object

An object of class '>MizerParams or '>MizerSim.

...

Other arguments (unused)

species

Name or vector of names of the species to be designated as background species. By default this is set to all species.

Value

An object of the same class as the object argument

Examples

Run this code
# NOT RUN {
data(NS_species_params_gears)
data(inter)
params <- MizerParams(NS_species_params_gears, inter)
sim <- project(params, effort=1, t_max=20, t_save = 0.2)
sim <- setBackground(sim, species = c("Sprat", "Sandeel", 
                                            "N.pout", "Dab", "Saithe"))
plotSpectra(sim)
# }

Run the code above in your browser using DataLab