Collect CLUMPP output files from multiple folders to one folder
collectClumppOutput(prefix = "pop", filetype = "aligned",
runsdir = NA, newdir = NA, quiet = FALSE)
A character indicating the prefix of the CLUMPP directories before the underscore. For ex. if the directories are pop_K2, then prefix is pop.
A character indicating the type of file to be copied. Options are 'aligned' to copy aligned files only, 'merged' to copy merged files only and 'both' to copy both files.
A character denoting the directory containing CLUMPP output
files in multiple directories. Use choose.dir()
for interactively
selecting the directory. If NA, the current working directory is used.
A character indicating the name of the new directory to be created with the collected runs. IF NA, the a directory name joining prefix and filetype is created.
A logical indicating if a message is to be displayed showing the number of folders processed and number of files processed.
Two integers are ruturned. The first denotes the number of directories processed. The second number denotes the number files copied.
Within each CLUMPP output folder, the function searches for filenames containing combination of prefix and filetype. This file is copied to the new folder. Therefore, do not manually rename CLUMPP output files or output directories.
See the vignette for more details.
# NOT RUN {
collectClumppOutput(runsdir="path")
collectClumppOutput(prefix="pop",runsdir="path")
# }
Run the code above in your browser using DataLab