# Concatenate all the matrices in a given path,
# ending with the pattern 'aligned.nex', including a morphological matrix
# also defined with a pattern
if (FALSE) {
path <- "sequences"
pattern <- "aligned.nex$"
concatNexus(matrices = NULL, pattern = pattern,
filename = paste(path, "concatenatedMolmorph.nexus", sep = "/"),
path = path,
morpho = TRUE,
morphoFilename = paste(path, grep(pattern = "morfologia",
x = dir(path, pattern), value = TRUE),
sep = "/"),
sumFilename = "partitions.txt")
}
# Concatenate arbitrary matrices in the working directory,
# including a morphological matrix, return a concatenated file in the same dir
if (FALSE) {
concatNexus(matrices = c("coi.nex", "rag1.nex", "cytb.nex", "morphology.nex"),
filename = "concatenatedMolmorph.nexus",
morpho = TRUE,
morphoFilename = "morphology.nex",
sumFilename = "partitions.txt")
}
Run the code above in your browser using DataLab