approxk2d {viper} | R Documentation |
This function uses a gaussian kernel to estimate the joint density distribution at the specified points
approxk2d(x, gridsize = 128, pos = x)
x |
Matrix of x and y points |
gridsize |
number or vector indicating the size of the greed where to estimate the density |
pos |
Matrix of coordinates to evaluate the density |
Vector of density estimates
x <- rnorm(500) y <- x+rnorm(500) kde2 <- approxk2d(cbind(x, y)) plot(x, y, pch=20, col=hsv(0, kde2/max(kde2), 1))