sen2r (version 1.2.1)

list_indices: List spectral indices

Description

Return a table with attributes of the spectral indices computable with the package.

Usage

list_indices(values, pattern = "", all = FALSE)

Arguments

values

A vector of attributes which will be returned, being one or more within the followings:

  • n_index: internal index identifiers;

  • name: index name;

  • longname: index description;

  • link: URL to the index description page;

  • s2_formula: expression containing the formula to compute the index;

  • s2_formula_mathml: MathML version of the formula;

  • checked: logical (TRUE for verified indices);

  • a, b, x: parameter values (NA for non required parameters).

pattern

A regular expression on index names.

all

Logical: if TRUE, all the indices retrieved from IDB are returned; if FALSE (default), only indices checked by the authors are returned.

Value

A data.frame with the required information. The table contains also the following attributes:

  • creation_date: timestamp of the creation date of the indices archive;

  • pkg_version: version of the sen2r package used to create the indices archive.

Examples

Run this code
# NOT RUN {
# Show index names
list_indices(c("name","longname"))

# Return the MSAVI2 formula
list_indices("s2_formula", "^MSAVI2$")

# Return all index names (including unchecked)
list_indices("name", all = TRUE)
# }

Run the code above in your browser using DataLab