Perform kernel density estimation on SpatialExperiment
Source:R/computeDensityHex.R
computeDensityHex.Rd
Perform kernel density estimation on SpatialExperiment
Usage
computeDensityHex(
spe,
kernel = c("gaussian"),
bandwidth = NULL,
weights = NULL,
ngrid.x = NULL,
grid.length.x = 100,
xlim = NULL,
ylim = NULL,
diggle = FALSE,
isVisium = F
)
Arguments
- spe
A SpatialExperiment object.
- kernel
The smoothing kernel. Options are gaussian, epanechnikov, quartic or disc. ONLY GAUSSIAN IS IMPLEMENTED
- 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.
- grid.length.x
Grid length in the x-direction. Default to 100 (micron).
- 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
- isVisium
Logical. If TRUE, fit hexagonal grids to Visium spots. correction. See spatstat.explore::density.ppp() for details.