sits_interp {sits}R Documentation

Interpolate values in time series

Description

Computes the interpolated bands using a user-defined function (by default the R base function approx)

Usage

sits_interp(
  data,
  fun = stats::approx,
  n = 2 * length(sits_timeline(data)),
  ...
)

Arguments

data

A tibble with time series data and metadata.

fun

Interpolation function (by default, stats::approx())

n

Number of time series elements to be created between start date and end date.

...

Additional parameters to be used by the fun function.

Value

A tibble with interpolated samples.

Author(s)

Rolf Simoes, rolf.simoes@inpe.br

Examples

# Retrieve a time series with values of NDVI
point_ndvi <- sits_select(point_mt_6bands, bands = "NDVI")
# find out how many time instances are there
n_times <- length(sits_timeline(point_ndvi))
# interpolate three times more points
point_int.tb <- sits_interp(point_ndvi, fun = stats::spline, n = 3 * n_times)
# plot the result
plot(point_int.tb)

[Package sits version 0.15.1 Index]