Description Usage Arguments Value Author(s) Examples
Estimate weighted kernel density
1 | 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
1 | 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.