density2d: Density estimation in 2d
Description
Estimate point densities on a regular grid for.
Usage
density2d(x, y, facet = NULL, n = 100, margin = "n")
Value
a density value for each point
Arguments
- x
x coordinates
- y
y coordinates
- facet
factor: estimate for each unique factor; can be NULL
- n
size of the grid
- margin
one of 'n','x' or 'y'; should the density be computed along both axes ('n'), or along 'x' or 'y' axis only