Rarity weighted richness scores are calculated using the following
terms . Let \(I\) denote the set of planning units (indexed by
\(i\)), let \(J\) denote the set of conservation features (indexed by
\(j\)), let \(r_{ij}\) denote the amount of feature \(j\)
associated with planning unit \(i\), and let \(M_j\) denote the
maximum value of feature \(j\) in \(r_{ij}\) in all planning units
\(i \in I\). To calculate the rarity weighted richness (RWR) for
planning unit \(k\):
$$
\mathit{RWR}_{k} = \sum_{j}^{J} \frac{ \frac{r_{kj}}{M_j} }{
\sum_{i}^{I} r_{ij}}
$$
Note that all arguments to solution
must correspond
to the planning unit data in the argument to x
in terms
of data representation, dimensionality, and spatial attributes (if
applicable). This means that if the planning unit data in x
is a numeric
vector then the argument to solution
must be a
numeric
vector with the same number of elements, if the planning
unit data in x
is a RasterLayer-class
then the
argument to solution
must also be a
RasterLayer-class
with the same number of rows and
columns and the same resolution, extent, and coordinate reference system,
if the planning unit data in x
is a Spatial-class
object then the argument to solution
must also be a
Spatial-class
object and have the same number of spatial
features (e.g. polygons) and have the same coordinate reference system,
if the planning units in x
are a data.frame
then the
argument to solution
must also be a data.frame
with each
column correspond to a different zone and each row correspond to
a different planning unit, and values correspond to the allocations
(e.g. values of zero or one).
Solutions must have planning unit statuses set to missing (NA
)
values for planning units that have missing (NA
) cost data. For
problems with multiple zones, this means that planning units must have
missing (NA
) allocation values in zones where they have missing
(NA
) cost data. In other words, planning units that have missing
(NA
) cost values in x
should always have a missing
(NA
) value the argument to solution
. If an argument is
supplied to
solution
where this is not the case, then an error will be thrown.