execute_zonal: Execute Zonal Stats

View source: R/zonal.R

execute_zonalR Documentation

Execute Zonal Stats

Description

Execute Zonal Stats

Usage

execute_zonal(
  data = NULL,
  geom = NULL,
  w = NULL,
  ID = NULL,
  fun = "mean",
  subds = 0,
  progress = FALSE,
  join = TRUE,
  drop = NULL,
  ...
)

Arguments

data

SpatRaster or file path

geom

sf, sfc object with polygonal geometries

w

a weight grid (produced with weight_grid)

ID

the grouping ID

fun

an optional function or character vector, as described below

subds

character or boolean to select a sub-dataset. If NULL all are selected

progress

if TRUE, display a progress bar during processing

join

if TRUE the geom will be joined to the results

drop

colnames to drop from table

...

optional arguments to pass fun

na.rm

remove na values?

Value

sf object or data.table


mikejohnson51/zonal documentation built on May 7, 2024, 1:38 p.m.