ts_fill_na | R Documentation |
Fill NA values in a raster time series
ts_fill_na(x_list_fill, maskvalues = NULL, verbose = FALSE, rule = 2, ...)
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 |
rule |
for the interpolation in first and last images. If rule is 1 then NAs are returned for such points and if it is 2, the value at the closest data extreme is used. Use, e.g., rule = 2:1, if the left and right side extrapolation should differ. See approxNA. Default is 2. |
... |
additional arguments to be passed on to approxNA. Of particular interest is the |
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.
A list of rasters with NAs filled.
Johannes Mast
#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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.