# NOT RUN {
# 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"))
# }
Run the code above in your browser using DataLab