Learn R Programming

sits (version 1.5.2)

sits_filter: Filter time series with smoothing filter

Description

Applies a filter to all bands, using a filter function such as sits_whittaker() or sits_sgolay().

Usage

sits_filter(data, filter = sits_whittaker())

Value

Filtered time series

Arguments

data

Time series (tibble of class "sits") or matrix.

filter

Filter function to be applied.

Examples

Run this code
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)
}

Run the code above in your browser using DataLab