Learn R Programming

sits (version 1.1.0)

sits_values: Return the values of a set of time series

Description

This function returns the values of a sits tibble (according a specified format). This function is useful to use packages such as ggplot2, dtwclust, or kohonen that require values that are rowwise or colwise organized.

Usage

sits_values(data, bands = NULL, format = "cases_dates_bands")

Value

A matrix with values.

Arguments

data

A sits tibble with time series for different bands.

bands

Bands whose values are to be extracted.

format

A string with either "cases_dates_bands" or "bands_cases_dates" or "bands_dates_cases".

Author

Rolf Simoes, rolf.simoes@inpe.br

Examples

Run this code
# Retrieve a set of time series with 2 classes
data(cerrado_2classes)
# retrieve the values split by bands and dates
ls1 <- sits_values(cerrado_2classes[1:2, ], format = "bands_dates_cases")
# retrieve the values split by cases (occurences)
ls2 <- sits_values(cerrado_2classes[1:2, ], format = "cases_dates_bands")
#' # retrieve the values split by bands and cases (occurences)
ls3 <- sits_values(cerrado_2classes[1:2, ], format = "bands_cases_dates")

Run the code above in your browser using DataLab