calculate_benefit | R Documentation |
Calculate the benefit of a hexagon from grts results.
calculate_benefit(
land_hex,
samples,
hex_id = hex_id,
stratum_id = NULL,
non_random_set = NULL,
land_cover_weights = NULL,
crs = 4326,
coords = c("lon", "lat"),
quiet = FALSE
)
land_hex |
(Spatial) Data frame. Land Cover data by hexagon. If
non-spatial, will be converted to spatial sf data frame using the |
samples |
(Spatial) Data frame. Results from |
hex_id |
Column. Identifies hexagon IDs (e.g., default |
stratum_id |
Column. Identifies larger area (e.g., |
non_random_set |
Character vector. |
land_cover_weights |
Data frame. Proportional weights
( |
crs |
Numeric, character, or sf/sfc. Coordinate reference system. Must
be valid input to |
coords |
Character vector. Names of the columns containing X and Y
coordinates (default |
quiet |
Logical. Whether to suppress progress messages. |
Spatial data frame with benefits per hex
# Using example data psu_hexagons and psu_samples
calculate_benefit(
land_hex = psu_hexagons,
samples = psu_samples,
non_random_set = c("SA_09", "SA_22", "SA_47"))
# Specify a non-random set
calculate_benefit(
land_hex = psu_hexagons,
samples = psu_samples,
non_random_set = c("SA_09", "SA_22", "SA_47"))
# Without GRTS
non_grts_samples <- draw_random_samples(
land_hex = psu_hexagons,
num_runs = 3,
n_samples = 10,
use_grts = FALSE)
calculate_benefit(
land_hex = psu_hexagons,
samples = non_grts_samples)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.