aggregate.grid: aggregate.grid

View source: R/aggregate.grid.R

aggregate.gridR Documentation

aggregate.grid

Description

The aggregation functions are based on the S3 method for zoo objects, but takes care of extra house keeping, such as attributes with meta data. Use given longitude-latitude coordinates to find the grid-boxes which are within these bins and aggregate them as with a data.frame object. This is a bit similar to regrid, but does not use bilinear interpolation. but the mean of grid boxes within a larger grid-box. Rasmus E. Benestad

Usage

## S3 method for class 'grid'
aggregate(x, ..., is, FUN = "mean", na.rm = TRUE, verbose = FALSE)

Arguments

x

A field object with finer grid mesh.

...

additional arguments

is

A list or field with the coarser grid with aggregated data from finer mesh.

FUN

A function, e.g., 'sum' or 'mean'

na.rm

a boolean; if TRUE ignore NA, see mean

verbose

a boolean; if TRUE print information about progress

Details

aggregate.grid is used for aggregating spatial statistics of a finer grid-mesh onto a coarser grid.

Value

The call returns a field object

Author(s)

R.E. Benestad

See Also

aggregate.area regrid

Examples


test.aggregate.grid()


metno/esd documentation built on April 24, 2024, 9:19 p.m.