GRasters can be "stacked" using this function, effectively creating a multi-layered raster. This is different from creating a 3-dimensional raster, though such an effect can be emulated using stacking. GVectors can be combined into a single vector. Stacks can only be created when:
All objects are the same class (either all
GRasters or allGVectors).All objects have the same coordinate reference system (see crs()).
Horizontal extents are the same (see
ext()).Horizontal dimensions are the same (see
res()).The topology (2- or 3-dimensional) must be the same. If 3D, then all rasters must have the same number of depths and vertical extents (see
topology()).
Data tables associated with GVectors will be combined if each vector has a table and if each table has the same columns and data types. Otherwise, the data table will be combined using merge().
See also
add<-, terra::c(), add<-
