Learn R Programming

prioritizr (version 8.0.6)

feature_names: Feature names

Description

Extract the names of the features in an object.

Usage

feature_names(x, ...)

# S3 method for ConservationProblem feature_names(x, ...)

# S3 method for ZonesRaster feature_names(x, ...)

# S3 method for ZonesSpatRaster feature_names(x, ...)

# S3 method for ZonesCharacter feature_names(x, ...)

Value

A character vector of feature names.

Arguments

x

problem() or Zones() object.

...

not used.

Examples

Run this code
if (FALSE) {
# load data
sim_pu_raster <- get_sim_pu_raster()
sim_features <- get_sim_features()

# create problem
p <-
  problem(sim_pu_raster, sim_features) %>%
  add_min_set_objective() %>%
  add_relative_targets(0.2) %>%
  add_binary_decisions()

# print feature names
print(feature_names(p))
}

Run the code above in your browser using DataLab