results_to_shp: This function joins the fitted model to the grid. It also...

View source: R/prioritize.R

results_to_shpR Documentation

This function joins the fitted model to the grid. It also saves the results as a shapefile in the out directory under the name priority_classes.shp.

Description

This function joins the fitted model to the grid. It also saves the results as a shapefile in the out directory under the name priority_classes.shp.

Usage

results_to_shp(
  out_dir,
  probs = c(0, 0.7, 0.9, 1),
  labels = c("Low", "Average", "High")
)

Arguments

out_dir

A path to directory for storing results.

probs

A numeric representing where to cut the priority.

labels

A character with labels for the priority categories. The number of labels must be one less than the number of probs.

Value

     An sf object with the priority classes.

Examples

## Not run: 
library(sf)
library(prioritizedeforestationhotspots)
out_dir <- "~/Documents/prioritize_res"
fit_model(out_dir)
results_to_shp(out_dir)

## End(Not run)


albhasan/prioritizedeforestationhotspots documentation built on Nov. 11, 2023, 3:12 p.m.