fillTime function

Fill time gaps in a SpatRaster

Fill time gaps in a SpatRaster

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) methods

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

Arguments

  • x: SpatRaster
  • filename: character. Output filename
  • ...: list with named options for writing files as in writeRaster

Returns

SpatRaster

See Also

approximate

Examples

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)
  • Maintainer: Robert J. Hijmans
  • License: GPL (>= 3)
  • Last published: 2025-02-26