Learn R Programming

npsp (version 0.3-6)

bin.den: Linear binning for density estimation

Description

Creates a bin.den-class (gridded binned density) object with linear binning counts.

Usage

bin.den(x, nbin = NULL)
as.bin.den(object, ...)
"as.bin.den" (object, ...)

Arguments

x
vector or matrix of covariates (e.g. spatial coordinates). Columns correspond with dimensions and rows with observations.
nbin
vector with the number of bins on each dimension.
object
(gridded data) used to select a method.
...
further arguments passed to or from other methods.

Value

Returns an S3 object of class bin.den (extends data.grid). A list with the following 3 components:
binw
vector or array (dimension nbin) with the bin counts (weights).
grid
a grid.par-class object with the grid parameters.
data
a list with a component $x with argument x.

Details

If parameter nbin is not specified is set to rep(25, ncol(x)).

See Also

np.den, bin.data, bin.data, locpol.