Description Usage Arguments Value Examples
Calculates the Densities of obervation in a 2D cell using Two-dimensional kernel density estimation with an axis-aligned bivariate normal kernel, evaluated on a square grid.
1 2 |
x |
a vector |
y |
a vector |
n |
Number of grid points in each direction. Can be scalar or a length-2 integer vector. |
h |
vector of bandwidths for x and y directions. Defaults to normal reference bandwidth (see bandwidth.nrd). A scalar value will be taken to apply to both directions. |
lims |
The limits of the rectangle covered by the grid as c(xl, xu, yl, yu). |
na.rm |
logical; if true, any NA and NaN's are removed from x before calculations |
a data.frame
with three variables
x, y
coordinates of the grid points, vectors of length n.
z
An n[1] by n[2] matrix of the estimated density: rows correspond to the value of
x, columns to the value of y.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.