calculate_density | R Documentation |
Estimate weighted kernel density
calculate_density(w, x, method, adjust = 1, map = TRUE)
w |
Vector with weights for each observation |
x |
Matrix with dimensions where to calculate the density from. Only the first two dimensions will be used |
method |
Kernel density estimation method:
|
adjust |
Numeric value to adjust to bandwidth. Default: 1. Not available
for |
map |
Whether to map densities to individual observations |
If map
is TRUE
, a vector with corresponding densities
for each observation is returned. Otherwise,
a list with the density estimates from the selected method is returned.
Jose Alquicira-Hernandez
dens <- Nebulosa:::calculate_density(iris[, 3], iris[, 1:2], method = "wkde")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.