rasterCreate: Simple wrapper to load any Raster* object

View source: R/load.R

rasterCreateR Documentation

Simple wrapper to load any ⁠Raster*⁠ object

Description

This wraps either raster::raster, raster::stack, raster::brick, or terra::rast, allowing a single function to be used to create a new object of the same class as a template. This works for all ⁠Raster*⁠ and SpatRaster class templates.

Usage

rasterCreate(x, ...)

## Default S3 method:
rasterCreate(x, ...)

Arguments

x

An object, notably a ⁠Raster*⁠ object. All others will simply be passed through with no effect.

...

Passed to raster::raster, raster::stack, or raster::brick

Value

a new (empty) object of same class as the original.

Methods (by class)

  • rasterCreate(default): Simply passes through argument with no effect


PredictiveEcology/SpaDES.core documentation built on April 27, 2024, 1:15 p.m.