Description Usage Arguments Value Author(s) Examples
Takes a sits tibble with different labels and returns a new tibble. For a given field as a group criterion, this new tibble contains a given number or percentage of the total number of samples per group. Parameter n: number of random samples with reposition. Parameter frac: a fraction of random samples without reposition. If frac > 1, no sampling is done.
1 | sits_sample(data, n = NULL, frac = NULL)
|
data |
Input sits tibble. |
n |
Number of samples to pick from each group of data. |
frac |
Percentage of samples to pick from each group of data. |
A sits tibble with a fixed quantity of samples.
Rolf Simoes, rolf.simoes@inpe.br
1 2 3 4 5 6 7 8 | # Retrieve a set of time series with 2 classes
data(cerrado_2classes)
# Print the labels of the resulting tibble
sits_labels(cerrado_2classes)
# Samples the data set
data <- sits_sample(cerrado_2classes, n = 10)
# Print the labels of the resulting tibble
sits_labels(data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.