Perform kernel density estimation on SpatialExperiment
Arguments
- spe
A SpatialExperiment object.
- mode
Choose either points or pixels. Specifying whether to compute the density at a grid pixel location or at at point.
- kernel
The smoothing kernel. Options are gaussian, epanechnikov, quartic or disc.
- bandwidth
The smoothing bandwidth. By default performing automatic bandwidth selection using cross-validation using function spatstat.explore::bw.diggle.
- weights
Optional weights to be attached to the points.
- ngrid.x
Number of grids in the x-direction.
- ngrid.y
Number of grids in the y-direction.
- grid.length.x
Grid length in the x-direction. Default to 100 (micron).
- grid.length.y
Grid length in the y-direction.
- xlim
The range of the x-coordinates of the image.
- ylim
The range of the y-coordinates of the image.
- diggle
Logical. If TRUE, use the Jones-Diggle improved edge correction. See spatstat.explore::density.ppp() for details.