sits_apply {sits}R Documentation

Apply a function on a set of time series

Description

Apply a named expression to a sits cube or a sits tibble to be evaluated and generate new bands (indices). In the case of sits cubes, it materializes a new band in 'output_dir' using 'gdalcubes'.

Usage

sits_apply(data, ...)

## S3 method for class 'sits'
sits_apply(data, ...)

## S3 method for class 'raster_cube'
sits_apply(data, ..., memsize = 1, multicores = 2, output_dir = getwd())

.apply_across(data, fn, ...)

Arguments

data

Valid sits tibble or cube

...

Named expressions to be evaluated.

memsize

memory available for classification (in GB).

multicores

number of cores to be used for classification.

output_dir

Directory where files will be saved.

Value

A sits tibble or a sits cube with new bands.

Author(s)

Rolf Simoes, rolf.simoes@inpe.br

Felipe Carvalho, felipe.carvalho@inpe.br

Gilberto Camara, gilberto.camara@inpe.br

Examples

# Get a time series
# apply a normalization function

point2 <-
  sits_select(point_mt_6bands, "NDVI") %>%
  sits_apply(NDVI_norm = (NDVI - min(NDVI)) / (max(NDVI) - min(NDVI))
)


[Package sits version 0.16.0 Index]