metaRangeSpecies object
Description
Section titled “Description”Creates an species object in form of an R6 class that stores and handles all the parts that define a species.
Public fields
Section titled “Public fields”name
:<string>
name or ID of the species.processes
:<list>
of<metaRangeProcesses>
. The processes that describe how the species interacts with the environment, itself and other species.traits
:<environment>
holds the traits of the species.sim
:<metaRangeSimulation>
A reference to the metaRangeSimulation simulation object that the species is part of. Useful to access environmental data or data of other species.
Methods
Section titled “Methods”Public methods
Section titled “Public methods”Method new()
Section titled “Method new()”Creates a new metaRangeSpecies object
metaRangeSpecies$new(name, sim)
Arguments
Section titled “Arguments”name
:<string>
name or ID of the species.sim
:<metaRangeSimulation>
A reference to the metaRangeSimulation simulation object that the species is part of. Useful to access environmental data or data of other species.
Returns
Section titled “Returns”A <metaRangeSpecies>
object.
Examples
Section titled “Examples”# The following is only for illustration purposes!# species should be added to a simulation via the `add_species` method# of the simulation object.sim_env <- terra::sds(terra::rast(vals = 1, nrow = 2, ncol = 2))test_sim <- metaRangeSimulation$new(source_environment = sim_env)sp <- metaRangeSpecies$new(name = "species_01", sim = test_sim)sp
Method print()
Section titled “Method print()”Prints information about the species to the console
metaRangeSpecies$print()
Returns
Section titled “Returns”<invisible self>
A <metaRangeSpecies>
object.
Examples
Section titled “Examples”## ------------------------------------------------## Method `metaRangeSpecies$new`## ------------------------------------------------
# The following is only for illustration purposes!# species should be added to a simulation via the `add_species` method# of the simulation object.sim_env <- terra::sds(terra::rast(vals = 1, nrow = 2, ncol = 2))test_sim <- metaRangeSimulation$new(source_environment = sim_env)sp <- metaRangeSpecies$new(name = "species_01", sim = test_sim)sp