Description Usage Arguments Value Author(s) Examples
getStarsAtHighestDensityRegion
will compute the 2D Kernel Density
Estimation for the requested subset of data and will return only the stars in the most
dense region.
1 2 | getStarsAtHighestDensityRegion(ocdata_out, threshold=2, posIdx=c(1,2),
plotAnalysis=FALSE, verbose=FALSE)
|
ocdata_out |
a data frame to use |
threshold |
a double with the thresholding level |
posIdx |
an array of integers indicating the columns of the data frame containing the spatial positions |
plotAnalysis |
a boolean indicating if the anaylsis should be plotted |
verbose |
a boolean indicating if the code should be verbose |
A data frame with the objects which were selected from ocdata_out
Alberto Krone-Martins, Andre Moitinho
1 2 3 4 5 6 7 8 9 10 11 | # Create a simple data set
toyDataDF <- data.frame(x=runif(50, 0, 10), y=runif(50, 0, 10), resMclust.class=rep(1, 50))
toyDataDF <- rbind(toyDataDF, data.frame(x=rnorm(50, 2, 3),
y=rnorm(50, 4, 3), resMclust.class=rep(1, 50)))
# Perform the XY density based cut
toyRes <- getStarsAtHighestDensityRegion(toyDataDF)
# Clean the environment
rm(list=c("toyDataDF", "toyRes"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.