sits_relabel: Relabels a sits tibble

Description Usage Arguments Value Author(s) Examples

View source: R/sits_labels.R

Description

Given a sits tibble with a set of labels, and a conversion list between the original labels and new labels, returns a new sits tibble whose labels are changed.

Usage

1
sits_relabel(data, conv.lst = list())

Arguments

data

A sits tibble.

conv.lst

A named list used to convert labels to a new value. Actual labels must be the names of the list elements. An empty list produces no difference.

Value

A new sits tibble with modified labels.

Author(s)

Gilberto Camara, gilberto.camara@inpe.br

Rolf Simoes, rolf.simoes@inpe.br

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Read a set of time series with information on deforestation
data(prodes_226_064)
# Print the labels
sits_labels(prodes_226_064)
# Create a conversion list.
# Three classes will be converted to "NonForest".
conv.lst = list(Deforestation_2014 = "NonForest",
                Deforestation_2015 = "NonForest",
                Pasture = "NonForest")
# relabel the data
new_data  <- sits_relabel(prodes_226_064, conv.lst)
# show the new labels
sits_labels(new_data)

e-sensing/sits.data documentation built on Dec. 26, 2019, 11:02 p.m.