bin2d: Bin data onto a grid.

Description Usage Arguments Value

View source: R/bin2d.R

Description

Bin data onto a equidistant grid in [0,1]^2.

Usage

1
bin2d(data.pos, data.weights, gridsize, turn = FALSE)

Arguments

data.pos

A Mx2 matrix specifying the positions of the data measure.

data.weights

A list of vectors of the same size as the number of rows in data.pos. All entries in the vector must be non-negative and the entries in the vector must sum to one.

gridsize

A vector of two integers specifying the dimensions of the grid, which the data should be binned to.

turn

A boolean specifying whether the output should be rotated to keep the previous orientation when the matrix is plotted with the image function.

Value

A matrix containing the weights of the measure in each bin.


WSGeometry documentation built on Dec. 15, 2021, 1:08 a.m.

Related to bin2d in WSGeometry...