Learn R Programming

sits (version 0.13.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)

Arguments

data

A sits tibble or data cube

bands

Character vector with the names of the bands

Value

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

Examples

Run this code
# NOT RUN {
# 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