Skip to contents

This 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 SpatRaster
time_bp(x)

# S4 method for SpatRasterDataset
time_bp(x)

time_bp(x) <- value

# S4 method for SpatRaster
time_bp(x) <- value

# S4 method for SpatRasterDataset
time_bp(x) <- value

Arguments

x

a terra::SpatRaster

value

a numeric vector of times in years BP

Value

a date in years BP (where negative numbers indicate a date in the past)