spdensity computes a kernel smoothed spatial density function from a point pattern. This is essentially a slight modification of the density.ppp function from the spatstat package, which computes the spatial intensity of a point pattern.spdensity(x, sigma = NULL, ..., weights = NULL, edge = TRUE,
varcov = NULL, at = "pixels", leaveoneout = TRUE, adjust = 1,
diggle = FALSE)im from the spatstat package, in nearly the exact same way as spatstat::density.ppp. The difference is that the values are scaled so that a true spatial density function is produced (i.e., the function integrates to 1).density.pppdata(grave)
contour(spdensity(grave))Run the code above in your browser using DataLab