VeloxRaster_aggregate: Aggregate

Description Arguments Details Value Examples

Description

Aggregates a VeloxRaster object to a lower resolution.

Arguments

factor

A numeric vector of length 1 or 2 indicating the aggregation factor in the x and y dimensions. Must be positive integers > 1.

aggtype

A character string indicating the aggregation type. See Details.

Details

aggtype must be one of the following: "sum", "mean", "min", "max", "median".

Value

Void.

Examples

1
2
3
4
5
## Make VeloxRaster
mat <- matrix(1:100, 10, 10)
vx <- velox(mat, extent=c(0,1,0,1), res=c(0.1,0.1), crs="+proj=longlat +datum=WGS84 +no_defs")
## Aggregate
vx$aggregate(factor=c(2,2), aggtype='sum')

hunzikp/velox documentation built on June 6, 2021, 2:40 a.m.