I am currently creating density objects for an environmental project that I am working on. Function densityin Rworks fine for setting density functions for my data.
The following is an example of how I use the function density:
dens.iris <- density(iris$Sepal.Length, bw = "bcv")
It works very well. However, the function predictdoes not work with objects density. Does anyone know a way to extract the density value for a specific point (for example, in a dataset iris, extract Sepal.Length 6.432)? It is very important to use the method for this biased cross validation.
source
share