Learn R Programming

ips (version 0.0-7)

write.partitioned.nex: Write partitioned and commented NEXUS files

Description

This function takes one or more objects of class "DNAbin" and writes them to an interleaved NEXUS file.

Usage

write.partitioned.nex(..., file, labels)

Arguments

One or more objects of class "DNAbin"

file

character string giving a file name

labels

vector of mode "character"; used to label partitions; its length must match the number of gene partitions

See Also

write.nex, write.phy, write.fas

Examples

Run this code
# NOT RUN {
# load sequence data and split in three parts
# -------------------------------------------
data(woodmouse)
w1 <- woodmouse[, 1:250]
w2 <- woodmouse[, 251:750]
w3 <- woodmouse[, 750:965]

# write nexus file with taxon block
# ---------------------------------
markers <- c("gene1", "gene2", "gene3")
write.partitioned.nex(w1, w2, w3, labels = markers)
# }

Run the code above in your browser using DataLab