promoteToRaster: Convert to Raster

View source: R/export-methods.R

promoteToRasterR Documentation

Convert to Raster

Description

Converts a Field, Comparison or data.table to a Raster object, also subsetting the requested layers. This is generally called in the as.Raster and the setAs functions but can be useful in and of itself.

Usage

promoteToRaster(
  input.data,
  layers = "all",
  tolerance = 0.01,
  grid.topology = NULL
)

Arguments

input.data

Field, Comparison or data.table

layers

The columns to be selected included in the final Raster* object. Use NULL or "all" if all layers are required.

tolerance

Tolerance (in fraction of gridcell size) for unevenly spaced Lon and Lats, when converting gridded table to a raster.

grid.topology

A character string defining the grid topology when going from a table to raster, used in a call to SpatialPixels

Value

A RasterLayer (or RasterBrick)

Author(s)

Matthew Forrest matthew.forrest@senckenberg.de


MagicForrest/DGVMTools documentation built on Aug. 23, 2024, 8:05 a.m.