sits_apply: Apply a function over SITS bands.

Description Usage Arguments Value Author(s)

Description

'sits_apply' returns a sits_table with the same samples points and new bands computed by 'fun', 'fun_index' functions. These functions must be defined inline and are called by 'sits_ts_apply' for each band, whose vector values is passed as the function argument.

'fun' function may either return a vector or a list of vectors. In the first case, the vector will be the new values of the corresponding band. In the second case, the returned list must have names, and each element vector will generate a new band which name composed by concatenating original band name and the corresponding list element name.

If a suffix is provided in 'bands_suffix', all resulting bands names will end with provided suffix separated by a ".".

Usage

1
2
sits_apply(data.tb, fun, fun_index = function(index) {     return(index) },
  bands_suffix = "")

Arguments

data.tb

a valid sits table

fun

a function with one parameter as input and a vector or list of vectors as output.

fun_index

a function with one parameter as input and a Date vector as output.

bands_suffix

a string informing the resulting bands name's suffix.

Value

data.tb a sits_table with same samples and the new bands

Author(s)

Rolf Simoes, rolf.simoes@inpe.br


luizassis/sits documentation built on May 30, 2019, 7:15 p.m.