# Read connectivity files from folder and combine them
combined_edge_list <- preprocess_graphs(system.file("external", package="priorCON"),
header = FALSE, sep =";")
# Set seed for reproducibility
set.seed(42)
cost_raster <- get_cost_raster()
features_rasters <- get_features_raster()
# Solve an ordinary prioritizr prioritization problem
basic_solution <- basic_scenario(cost_raster=cost_raster,
features_rasters=features_rasters, budget_perc=0.1)
# Plot solution raster
terra::plot(basic_solution$solution, main="Basic Solution")
Run the code above in your browser using DataLab