inputData | R Documentation |
Create the data object with information about the multi-action conservation planning problem. This function is used to specify all the data that defines the spatial prioritization problem (planning units data, feature data, threats data, and their spatial distributions.)
inputData(pu, features, dist_features, threats, dist_threats, ...)
## S4 method for signature
## 'data.frame,data.frame,data.frame,data.frame,data.frame'
inputData(
pu,
features,
dist_features,
threats,
dist_threats,
sensitivity = NULL,
boundary = NULL
)
pu |
Object of class
|
features |
Object of class The Note that by default only information on recovery targets is necessary,
while conservation targets equal to zero are assumed. The maximum values of
benefits to achieve both recovery and conservation per feature can be verified
with the This file must contain the following columns:
|
dist_features |
Object of class
|
threats |
Object of class
|
dist_threats |
Object of class
|
... |
Unused arguments, reserved for future expansion. |
sensitivity |
(optional) Object of class Sensitivity can be parameterized in two ways: binary; the feature is
sensitive or not, or continuous; with response curves of the probability of
persistence of the features to threats. For the first case, it is only necessary
to indicate the ids of the threats and the respective features sensitive to them.
In the second case, the response can be parameterized through four values:
Note that optional parameters delta1, delta2, delta3 and delta4 can be provided independently. |
boundary |
(optional) Object of class
|
An object of class data.
Ball I, Possingham H, Watts, M. Marxan and relatives: software for spatial conservation prioritization. Spatial conservation prioritisation: quantitative methods and computational tools 2009.
For more information on the correct format for Marxan input data, see the official Marxan website and Ball et al. (2009).
## set seed for reproducibility
set.seed(14)
## Set prioriactions path
prioriactions_path <- system.file("extdata/example_input/", package = "prioriactions")
## Load in planning unit data
pu_data <- data.table::fread(paste0(prioriactions_path,"/pu.dat"),
data.table = FALSE)
head(pu_data)
## Load in feature data
features_data <- data.table::fread(paste0(prioriactions_path,"/features.dat"),
data.table = FALSE)
head(features_data)
## Load in planning unit vs feature data
dist_features_data <- data.table::fread(paste0(prioriactions_path,"/dist_features.dat"),
data.table = FALSE)
head(dist_features_data)
## Load in the threats data
threats_data <- data.table::fread(paste0(prioriactions_path,"/threats.dat"),
data.table = FALSE)
head(threats_data)
## Load in the threats distribution data
dist_threats_data <- data.table::fread(paste0(prioriactions_path,"/dist_threats.dat"),
data.table = FALSE)
head(dist_threats_data)
## Load in the sensitivity data
sensitivity_data <- data.table::fread(paste0(prioriactions_path,"/sensitivity.dat"),
data.table = FALSE)
head(sensitivity_data)
## Load in the boundary data
boundary_data <- data.table::fread(paste0(prioriactions_path,"/boundary.dat"),
data.table = FALSE)
head(boundary_data)
## Create data instance
problem_data <- inputData(
pu = sim_pu_data, features = sim_features_data, dist_features = sim_dist_features_data,
threats = sim_threats_data, dist_threats = sim_dist_threats_data,
sensitivity = sim_sensitivity_data, boundary = sim_boundary_data
)
## Summary
print(problem_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.