
Extract and set time in years before present for SpatRaster and SpatRasterDataset
Source:R/time_bp.R
time_bp.RdThis functions extracts and sets time in years BP (i.e. from 1950) for a
terra::SpatRaster or a terra::SpatRasterDataset. In a
terra::SpatRaster object, time is stored with unit "years", which are
years from 0AD. This means that, when a summary of the terra::SpatRaster
is inspected, the times will appear as time_bp+1950. The same applies when
the function terra::time() is used instead of time_bp().
Usage
time_bp(x)
# S4 method for class 'SpatRaster'
time_bp(x)
# S4 method for class 'SpatRasterDataset'
time_bp(x)
time_bp(x) <- value
# S4 method for class 'SpatRaster'
time_bp(x) <- value
# S4 method for class 'SpatRasterDataset'
time_bp(x) <- value