Learn R Programming

mapme.biodiversity (version 0.9.2)

indicators: Register or list indicators in mapme.biodiversity

Description

register_indicator() is used to register a new indicator function with base information to the package's internal environment used to inform users about available indicators. Note, registering a custom indicator will only have effect for the current R session.

available_indicators() returns a tibble of registered indicators with basic information such as the required resources.

Usage

register_indicator(name = NULL, description = NULL, resources = NULL)

available_indicators(indicators = NULL)

Value

register_indicator() is called for the side-effect of registering an indicator

available_resources() returns a tibble listing available indicators.

Arguments

name

A character vector indicating the name of the indicator.

description

A character vector with a basic description

resources

A character vector of the required resources that need to be available to calculate the indicator. The names must correspond with already registered resources.

indicators

If NULL returns a list of all registered indicators (default). Otherwise only the ones specified.

Examples

Run this code
if (FALSE) {
register_indicator(
  name = "treecover_area",
  description = "Area of forest cover by year",
  resources = c(
    "gfw_treecover",
    "gfw_lossyear"
  )
)
}
available_indicators()

Run the code above in your browser using DataLab