Learn R Programming

sits (version 1.2.0)

sits_select: Filter bands on a data set (tibble or cube)

Description

Filter only the selected bands from a tibble or a data cube.

Usage

sits_select(data, bands, ...)

# S3 method for sits sits_select(data, bands, ...)

# S3 method for raster_cube sits_select( data, bands = NULL, ..., start_date = NULL, end_date = NULL, tiles = NULL )

# S3 method for patterns sits_select(data, bands, ...)

Value

For sits tibble, returns a sits tibble with the selected bands. For data cube, a data cube with the selected bands.

Arguments

data

A sits tibble or data cube.

bands

Character vector with the names of the bands.

...

Additional parameters to be provided in the select function.

start_date

Character value with the start date band to be filtered.

end_date

Character value with the end date band to be filtered.

tiles

Character vector with the names of the tiles.

Author

Rolf Simoes, rolf.simoes@inpe.br

Examples

Run this code
# Retrieve a set of time series with 2 classes
data(cerrado_2classes)
# Print the original bands
sits_bands(cerrado_2classes)
# Select only the NDVI band
data <- sits_select(cerrado_2classes, bands = c("NDVI"))
# Print the labels of the resulting tibble
sits_bands(data)

Run the code above in your browser using DataLab