sits_merge | R Documentation |
To merge two series, we consider that they contain different attributes but refer to the same data cube, and spatiotemporal location. This function is useful to merge different bands of the same locations. For example, one may want to put the raw and smoothed bands for the same set of locations in the same tibble.
To merge data cubes, they should share the same sensor, resolution, bounding box, timeline, and have different bands.
sits_merge(data1, data2, ...)
## S3 method for class 'sits'
sits_merge(data1, data2, ..., suffix = c(".1", ".2"))
## S3 method for class 'sar_cube'
sits_merge(data1, data2, ...)
## S3 method for class 'raster_cube'
sits_merge(data1, data2, ...)
## Default S3 method:
sits_merge(data1, data2, ...)
data1 |
Time series (tibble of class "sits") or data cube (tibble of class "raster_cube") . |
data2 |
Time series (tibble of class "sits") or data cube (tibble of class "raster_cube") . |
... |
Additional parameters |
suffix |
If there are duplicate bands in data1 and data2 these suffixes will be added (character vector). |
merged data sets (tibble of class "sits" or tibble of class "raster_cube")
Gilberto Camara, gilberto.camara@inpe.br
if (sits_run_examples()) {
# Retrieve a time series with values of NDVI
point_ndvi <- sits_select(point_mt_6bands, bands = "NDVI")
# Filter the point using the Whittaker smoother
point_whit <- sits_filter(point_ndvi, sits_whittaker(lambda = 3.0))
# Merge time series
point_ndvi <- sits_merge(point_ndvi, point_whit, suffix = c("", ".WHIT"))
# Plot the two points to see the smoothing effect
plot(point_ndvi)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.