setBackground: Designate species as background species

Description Usage Arguments Value Examples

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.

Set species to background species in MizerParams object

Set species to background species in MizerSim object

Usage

1
2
3
4
5
6
7
8
9
setBackground(object, ...)

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

## S4 method for signature '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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

## End(Not run)

drfinlayscott/mizer documentation built on May 18, 2018, 9:20 a.m.