## Not run:
# #
# # Example of how to run UPMASK using data from a file
# # Note: serious analysis require larger nRuns, and see UPMASKfile documentation
# # for the parametrization.
# # Write a string with the filename of the input and output files
# inputFileName <- system.file("extdata",
# "oc_12_500_1000_1.0_p019_0880_1_25km_120nR_withcolors.dat", package="UPMASK")
# outputFileName <- file.path(tempdir(), "RESULTS.dat")
# # Run UPMASK
# UPMASKfile(inputFileName, outputFileName, nRuns=5, starsPerClust_kmeans=25,
# verbose=TRUE, fileWithHeader=TRUE)
# # Done, the results are written to the file outputFileName
#
# #
# # Example of how to run UPMASK using data from a data frame
# # Note: serious analysis require larger nRuns, and see UPMASKdata documentation
# # for the parametrization.
# # Load the data into a data frame
# inputFileName <- system.file("extdata",
# "oc_12_5000_4000_4.0_p019_0900_1_15km_120nR_withcolors.dat", package="UPMASK")
# ocData <- read.table(inputFileName, header=TRUE)
# # Run UPMASK
# upmaskRes <- UPMASKdata(ocData, nRuns=5, starsPerClust_kmeans=25, verbose=TRUE)
# # Done, the results are in the data frame upmaskRes
#
# # Clean the environment
# rm(list=c("inputFileName","outputFileName","ocData","upmaskRes"))
# ## End(Not run)
Run the code above in your browser using DataLab