Skip to contents

Smooth raster time-series and interpolate missing values using a smoother function.

Usage

smoothout(x, ...)

# S4 method for Satellite
smoothout(x, variable, smoother = "wt1", pre = NULL, post = NULL)

Arguments

x

S4 object. The product of interest.

...

extra arguments.

variable

character. The variable of interest.

smoother

character. A function to be applied on the original data.

pre

character. A vector of dates to be used as an extra smoothing window before the dates of interest.

post

character. A vector of dates to be used as an extra smoothing window after the dates of interest.

Value

nothing. The smoothed data are saved directly in the cronus database.

Examples

if (FALSE) {
# Define required variables
region <- Region(name = "nebraska", type = "us state",
                 div = c(country = "United States", state = "Nebraska"))
date <- date_seq("2002-01-01", "2002-12-31")

## MOD09GA

# Create the object
x <- new("Mod09ga", region = region, date = date)

# Smooth the raster cell time-series
smoothout(x, "ndvi", pre = NULL, post = NULL)
}