Description Usage Arguments Value Author(s) Examples
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.
1 | sits_relabel(data, conv.lst = list())
|
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. |
A new sits tibble with modified labels.
Gilberto Camara, gilberto.camara@inpe.br
Rolf Simoes, rolf.simoes@inpe.br
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.