ts_fill_na: Fill NA values in a raster time series

Description Usage Arguments Details Value Author(s) Examples

View source: R/ts_fill_na.R

Description

Fill NA values in a raster time series

Usage

1
ts_fill_na(x_list_fill, maskvalues = NULL, verbose = FALSE, ...)

Arguments

x_list_fill

a list of raster objects.

maskvalues

numeric, a vector of values to be set to NA before the masking.

verbose

(Optional) logical. If TRUE outputs progress. Default is FALSE.

...

additional arguments to be passed on to approxNA. Of particular interest is the rule argument which defines how first and last cells are dealt with.

Details

Loads all layers of a specific bands into a stack and uses approxNA to fill the NAs if possible. Note that the procedure requires the entire list of raster layery for each band to be be stacked. It is therefore very memory intensive and likely to fail for very large time series.

Value

A list of rasters with NAs filled.

Author(s)

Johannes Mast

Examples

1
2
3
4
5
6
#Setup
 library(rtsVis)
x_list <- MODIS_SI_ds[seq(1,length(MODIS_SI_ds),15)]   #A list of raster objects

#Fill NAs
x_list_filled <- ts_fill_na(x_list) 

rtsVis documentation built on May 26, 2021, 5:07 p.m.