Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

zones

Management zones


Description

Organize biodiversity data into the expected amount of different features under different management zones.

Usage

zones(..., zone_names = NULL, feature_names = NULL)

Arguments

...

raster::raster() or character objects that pertain to the biodiversity data. See Details for more information.

zone_names

character names of the management zones. Defaults to NULL which results in sequential integers.

feature_names

character names of the features zones. Defaults to NULL which results in sequential integers.

Details

This function is used to store and organize data for use in a conservation planning problem() that has multiple management zones. In all cases, the data for each zone is input as a separate argument. The correct arguments depends on the type of planning unit data used when building the conservation planning problem().

Raster, Spatial

Raster data denoting the amount of each feature present assuming each management zone. Data for each zone are specified in separate arguments, and the data for each feature in a given zone are specified in separate layers in a raster::stack() object. Note that all layers for a given zone must have NA values in exactly the same cells.

Spatial(), data.frame

character vector with column names that correspond to the abundance or occurrence of different features in each planning unit for each zone. Note that these columns must not contain any NA values.

Spatial(), data.frame or matrix

data.frame denoting the amount of each feature in each zone. Following conventions used in Marxan, data.frame objects should be supplied with the columns:

pu

integer planning unit identifier.

species

integer feature identifier.

amount

numeric amount of the feature in the planning unit for a given zone.

Note that data for each zone are specified in a separate argument, and the data contained in a single data.frame object correspond to a single zone. Also, note that data are not required for all combinations of planning units, features, and zones. The amounts of features in planning units assuming different management zones that are missing from the table are treated as zero.

Value

Zones object.

See Also

Examples

# load planning unit data
data(sim_pu_raster)

zone_1 <- simulate_species(sim_pu_raster, 3)
zone_2 <- simulate_species(sim_pu_raster, 3)

# create zones using two raster stack objects
# each object corresponds to a different zone and each layer corresponds to
# a different species
z <- zones(zone_1, zone_2, zone_names = c("zone_1", "zone_2"),
           feature_names = c("feature_1", "feature_2", "feature_3"))
print(z)

# note that the do.call function can also be used to create a Zones object
# this method for creating a Zones object can be helpful when there are many
# management zones
l <- list(zone_1, zone_2, zone_names = c("zone_1", "zone_2"),
          feature_names = c("feature_1", "feature_2", "feature_3"))
z <- do.call(zones, l)
print(z)

# create zones using character vectors that represent the names of
# fields (columns) in a data.frame or Spatial object that contain the amount
# of each species expected different management zones
z <- zones(c("spp1_zone1", "spp2_zone1"),
           c("spp1_zone2", "spp2_zone2"),
           c("spp1_zone3", "spp2_zone3"),
           zone_names = c("zone1", "zone2", "zone3"),
           feature_names = c("spp1", "spp2"))
print(z)

prioritizr

Systematic Conservation Prioritization in R

v7.0.1
GPL-3
Authors
Jeffrey O Hanson [aut] (<https://orcid.org/0000-0002-4716-6134>), Richard Schuster [aut, cre] (<https://orcid.org/0000-0003-3191-7869>), Nina Morrell [aut], Matthew Strimas-Mackey [aut] (<https://orcid.org/0000-0001-8929-7776>), Matthew E Watts [aut], Peter Arcese [aut] (<https://orcid.org/0000-0002-8097-482X>), Joseph Bennett [aut] (<https://orcid.org/0000-0002-3901-9513>), Hugh P Possingham [aut] (<https://orcid.org/0000-0001-7755-996X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.