hist2d: Get frequencies for a 2D histogram

View source: R/graphics2d.R

hist2dR Documentation

Get frequencies for a 2D histogram

Description

?

Usage

hist2d(x, y = NA, nbins = c(25, 25), edges = NA)

Arguments

nbins

A numeric vector with two integers: the number of bins for X and for Y coordinates, defaults to c(25, 25).

edges

A list with the edges for the X and Y coordinates respectively. This allows irregular bin sizes. Note that the number of edges is the number of bins plus 1. If 'edges' is given it overrides 'nbins'.

X

Vector of X-coordinates, or a Mx2 matrix with M sets of X and Y coordinates, or data frame with x and y column.

Y

If X is not a matrix or data frame, but a vector this has to be a vector of equal length with Y coordinates.

Details

?

Value

A list with three entries: - 'freq2D' numeric matrix with counts for each bin - 'x.edges' numeric vector with the edges used for x coordinates - 'y.edges' numeric vector with the edges used for y coordinates

Examples

?

thartbm/SMCL documentation built on Oct. 23, 2022, 5:17 a.m.