vbin.grid: 2D random field binning

View source: R/seq.R

vbin.gridR Documentation

2D random field binning

Description

Generate a bined matrix given a 2D random field.

Usage

vbin.grid(x, y, z, nx, ny, FUN = mean, na = NA)

Arguments

x, y, z

a random field with location vectors (x, y) and value vector z. They must have the same length.

nx, ny

the number of bins in x and y dimension.

FUN

a function to calculate statistics in each 2D bin.

na

Replacemnet for NA value in matrix bins.

Value

a matrix with row (column) names being the center points of x (y) dim, and with cell value being the aggregate statistics calculated by FUN.

See Also

seq_approximate, vbin, vbin.range

Examples

vbin.grid(1:20, 20:1, runif(20), nx=5, ny=5)

caesar0301/movr documentation built on June 18, 2022, 2:37 a.m.