Convert a SpatRaster
object to an sftime
object. x
must
contain a time-defining column, identified in timename
.
Usage
spatraster_as_sftime(x, varname, timename = "time")
Arguments
- x
a SpatRaster
object
- varname
character for variable column name in the sftime
- timename
character for time column name in the sftime
(default: "time")