ra_from_sp: Function to create a raster object from a spatial (vector)...

View source: R/ra_from_sp.R

ra_from_spR Documentation

Function to create a raster object from a spatial (vector) object.

Description

Function to create a raster object from a spatial (vector) object.

Usage

ra_from_sp(
  sp,
  resolution,
  fun = mean,
  na.rm = TRUE,
  background = NA,
  drop_index = TRUE
)

Arguments

sp

Spatial object with a data slot.

resolution

Resolution of the returned raster object, optional.

fun

Function to determine how multiple observations in a single raster cell are handled.

na.rm

For fun, should NAs be ignored?

background

Cell's default value when there are no data within the cell.

drop_index

Should the index be dropped from the raster return?

Value

Raster layer or raster brick.

Author(s)

Stuart K. Grange

See Also

rasterize


skgrange/gissr documentation built on Feb. 24, 2024, 2:55 p.m.