terra::zonal
How terra runs Zonal statistics: terra::zonal.
| Engine | terra |
|---|---|
| Tool name | terra::zonal |
| Interface | r |
| Implements | Zonal statistics |
| Documentation | Not stated |
| Effects | modifies input: no, network: no |
| Notes | S4 generic: parameters gathered from all its methods; each method takes a subset. |
| Status | active |
Parameters
| Name | Type | Required | Default | Choices | Note |
|---|---|---|---|---|---|
x | any | yes | Not stated | Not stated | Not stated |
z | any | yes | Not stated | Not stated | Not stated |
... | dots | no | Not stated | Not stated | further arguments passed on |
fun | any | no | "mean" | Not stated | Not stated |
w | any | no | NULL | Not stated | Not stated |
wide | any | no | TRUE | Not stated | Not stated |
as.raster | any | no | FALSE | Not stated | Not stated |
filename | any | no | "" | Not stated | Not stated |
overwrite | any | no | FALSE | Not stated | Not stated |
wopt | any | no | list() | Not stated | Not stated |
na.rm | any | no | FALSE | Not stated | Not stated |
weights | any | no | FALSE | Not stated | Not stated |
exact | any | no | FALSE | Not stated | Not stated |
touches | any | no | FALSE | Not stated | Not stated |
small | any | no | TRUE | Not stated | Not stated |
as.polygons | any | no | FALSE | Not stated | Not stated |
weighted | any | no | FALSE | Not stated | Not stated |
How it maps to the operation
| Operation parameter | Parameter here | Note |
|---|---|---|
raster | x | Not stated |
zones | z | Not stated |
stats | fun | count = notNA; mean = mean; min = min; max = max; sum = sum; std = sd |
all_touched | touches | Not stated |
Differences from the operation
- Zones can be a raster of zone codes or polygons (SpatVector); results come back as a data frame.
- std is computed by R's sd (sample standard deviation).
Harvested by the r-packages harvester from engine version
1.9.50. Names can change when an engine is harvested again.