metaRangeSpecies | R Documentation |
Creates an species object in form of an R6 class that stores and handles all the individual parts that define a species.
A <metaRangeSpecies>
object.
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.
new()
Creates a new metaRangeSpecies object
metaRangeSpecies$new(name, sim)
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.
A <metaRangeSpecies>
object.
# The following is bad practice, since species should be added to a simulation # via the add_species method of the simulation object. But for illustration # purposes: 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
print()
Prints information about the species to the console
metaRangeSpecies$print()
<invisible self>
## ------------------------------------------------
## Method `metaRangeSpecies$new`
## ------------------------------------------------
# The following is bad practice, since species should be added to a simulation
# via the add_species method of the simulation object. But for illustration
# purposes:
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.