## Not run:
# # Analyse a simulated open cluster using spatial and photometric data
# # Load the data into a data frame
# fileNameI <- "oc_12_500_1000_1.0_p019_0880_1_25km_120nR_withcolors.dat"
# inputFileName <- system.file("extdata", fileNameI, package="UPMASK")
# ocData <- read.table(inputFileName, header=TRUE)
#
# # Example of how to run UPMASK using data from a data frame
# # (serious analysis require at least larger nRuns)
# posIdx <- c(1,2)
# photIdx <- c(3,5,7,9,11,19,21,23,25,27)
# photErrIdx <- c(4,6,8,10,12,20,22,24,26,28)
#
# upmaskRes <- UPMASKdata(ocData, posIdx, photIdx, PhotErrIdx, nRuns=2,
# starsPerClust_kmeans=25, verbose=TRUE)
#
# # Create a simple raw plot to see the results
# pCols <- upmaskRes[,length(upmaskRes)]/max(upmaskRes[,length(upmaskRes)])
# plot(upmaskRes[,1], upmaskRes[,2], col=rgb(0,0,0,pCols), cex=0.5, pch=19)
#
# # Clean the environment
# rm(list=c("inputFileName", "ocData", "posIdx", "photIdx", "photErrIdx",
# "upmaskRes", "pCols"))
# ## End(Not run)
Run the code above in your browser using DataLab