powered by
Creates a bin.den-class (gridded binned density) object with linear binning counts.
bin.den
class
bin.den(x, nbin = NULL)as.bin.den(object, ...)# S3 method for data.grid as.bin.den(object, weights.ind = 1, ...)# S3 method for bin.den as.bin.den(object, ...)
as.bin.den(object, ...)
# S3 method for data.grid as.bin.den(object, weights.ind = 1, ...)
# S3 method for bin.den as.bin.den(object, ...)
Returns an S3 object of class
bin.den (extends data.grid). A list with the following 3 components:
data.grid
vector or array (dimension nbin) with the bin counts (weights).
nbin
a grid.par-class object with the grid parameters.
grid.par
a list with a component $x with argument x.
$x
x
vector or matrix of covariates (e.g. spatial coordinates). Columns correspond with dimensions and rows with observations.
vector with the number of bins on each dimension.
(gridded data) used to select a method.
further arguments passed to or from other methods.
integer or character with the index or name of the component containing the bin counts/weights.
If parameter nbin is not specified is set to pmax(25, rule.binning(x)).
pmax(25, rule.binning(x))
np.den, h.cv, bin.data, locpol, rule.binning.
np.den
h.cv
bin.data
locpol
rule.binning
binden <- bin.den(earthquakes[, c("lon", "lat")], nbin = c(30,30)) bindat <- binning(earthquakes[, c("lon", "lat")], earthquakes$mag, nbin = c(30,30)) all.equal(binden, as.bin.den(bindat))
Run the code above in your browser using DataLab