This function creates an empty copy of a provided
SpatRaster
object. It is primarily used in the package to create the
outputs for the predictions.
Arguments
- x
A
SpatRaster*
object corresponding.- ...
other arguments that can be passed to
terra
Value
an empty SpatRaster
, i.e. all cells are NA
.
Examples
require(terra)
#> Loading required package: terra
#> terra 1.7.78
#>
#> Attaching package: ‘terra’
#> The following object is masked from ‘package:ibis.iSDM’:
#>
#> modal
r <- rast(matrix(1:100, 5, 20))
emptyraster(r)
#> class : SpatRaster
#> dimensions : 5, 20, 1 (nrow, ncol, nlyr)
#> resolution : 1, 1 (x, y)
#> extent : 0, 20, 0, 5 (xmin, xmax, ymin, ymax)
#> coord. ref. :