Description Usage Arguments Value Author(s) References Examples
kde2dForSubset
will compute the 2D Kernel Density Estimation for
the requested subset of data and will return the quantiy (max(d)-mean(d))/sd(d)
if the option returnDistance
is set to TRUE.
1 2 |
df |
a data frame to use |
setw |
an integer with the class of the stars to perform the analysis |
n |
the number of points in the regular grid of the density estimation |
showStats |
a boolean indicating if the user wants to see output statistics |
printPlots |
a boolean indicating if the user wants to see plots |
returnDistance |
a boolean indicating if the distance between the max and the mean in units of standard deviations should be returned |
positionDataIndexes |
an array of integers indicating the columns of the file containing the spatial position measurements |
A double representing the density based distance quantity.
Alberto Krone-Martins, Andre Moitinho
Krone-Martins, A. & Moitinho, A., A&A, v.561, p.A57, 2014
1 2 3 4 5 6 7 8 9 | # Create a simple data set with the values and errors
toyDataDF <- data.frame(x=runif(50, 0, 10), y=runif(50, 0, 10), resMclust.class=rep(1, 50))
# Run the KDE 2D analysis for the required subset
disV <- kde2dForSubset(toyDataDF, showStats=FALSE, printPlots=FALSE, returnDistance=TRUE)
# Clean the environment
rm(list=c("toyDataDF", "disV"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.