Learn R Programming

terra (version 1.8-86)

fillTime: Fill time gaps in a SpatRaster

Description

Add empty layers in between existing layers such that the time step between each layer is the same. See approximate to estimate values for these layer (and other missing values)

Usage

# S4 method for SpatRaster
fillTime(x, filename="", ...)

Arguments

Value

SpatRaster

See Also

approximate

Examples

Run this code
r <- rast(system.file("ex/logo.tif", package="terra"))   
s <- c(r, r)
time(s) <- as.Date("2001-01-01") + c(0:2, 5:7)
time(s)
ss <- fillTime(s)
time(ss)

a <- approximate(ss)

Run the code above in your browser using DataLab