filter_platforms {rsi}R Documentation

Filter indices based on (relatively) complicated fields

Description

Filter indices based on (relatively) complicated fields

Usage

filter_platforms(
  indices = spectral_indices(),
  platforms = unique(unlist(spectral_indices(download_indices = FALSE, update_cache =
    FALSE)$platforms)),
  operand = c("all", "any")
)

filter_bands(
  indices = spectral_indices(),
  bands = unique(unlist(spectral_indices(download_indices = FALSE, update_cache =
    FALSE)$bands)),
  operand = c("all", "any"),
  type = c("filter", "search")
)

Arguments

indices

The data frame to filter. Must contain the relevant column.

platforms, bands

Names of the instruments (for platforms) or spectra (for bands) indices must contain.

operand

A function defining how to apply this filter. For instance, operand = all means that the index must contain all the platforms or bands provided, while operand = any means that the index must contain at least one of the platforms or bands provided.

type

What type of query is this? If filter, then indices are returned if all/any the bands they use (depending on operand) are in bands. If search, then indices are returned if all/any of bands are in the bands they use.

Value

A filtered version of indices.

Examples

filter_platforms(platforms = "Sentinel-2")
filter_platforms(platforms = c("Landsat-OLI", "Sentinel-2"))
filter_bands(bands = c("R", "N"), operand = any)


[Package rsi version 0.2.1 Index]