getStarsAtHighestDensityRegion: Perform cut in the membership list based on the 2D space...

Description Usage Arguments Value Author(s) Examples

Description

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.

Usage

1
2
getStarsAtHighestDensityRegion(ocdata_out, threshold=2, posIdx=c(1,2), 
plotAnalysis=FALSE, verbose=FALSE)

Arguments

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

Value

A data frame with the objects which were selected from ocdata_out

Author(s)

Alberto Krone-Martins, Andre Moitinho

Examples

 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"))
 

UPMASK documentation built on May 2, 2019, 2:39 p.m.