Biomass_**
modulesR/sppHarmonize.R
sppHarmonize.Rd
This function will attempt to harmonize many potential issues/conflicts that may arise under different combinations of supplied objects to the three arguments. See manual for details.
sppHarmonize(
sppEquiv,
sppNameVector,
sppEquivCol,
sppColorVect,
vegLeadingProportion = 0,
studyArea,
dPath = getOption("reproducible.destinationPath")
)
table with species name equivalencies between the kNN and final naming formats.
See data("sppEquivalencies_CA", "LandR")
.
For functions that have mixedType
, this only necessary if mixedType == 2
.
If not provided and mixedType == 2
, will attempt to use data("sppEquivalencies_CA", "LandR")
.
A character vector of species to use. These species must all
be from one naming convention, i.e., from one column in the sppEquiv
.
A character string normally provided from the P(sim)$sppEquivCol
(see manual). If NA
, the default, then this will try to determine which
column the sppNameVector
used and use that. If sppNameVector
is NULL, then
it will default to "Boreal"
.
A named vector of colours to use for plotting.
The names must conform with species name convention used
(see sppEquivalencies_CA for possible naming
conventions) and should also contain a colour for 'Mixed',
when a mixed forest type is supported (see vegLeadingProportion
parameter in vegTypeGenerator()
for details on mixed
forest types).
Numeric between 0-1, determining the relative biomass threshold a species needs to pass to be considered "leading".
A SpatialPolygons*
object used as the principle study region,
passed to reproducible::prepInputs()
.
Passed to speciesInStudyArea
(which then passes to preProcess
)
Returns a named list with the same names as the arguments. These should
likely be assigned to the sim
object in the module following this function call.
## not run. usage example within module
# sppOuts <- sppHarmonize(sim$sppEquiv, sim$sppNameVector, P(sim)$sppEquivCol)
# sim$sppEquiv <- sppOuts$sppEquiv
# sim$sppNameVector <- sppOuts$sppNameVector
# P(sim)$sppEquivCol <- sppOuts$sppEquivCol