# NOT RUN {
data(ips.cox1)
data(ips.28S)
## Examples for FASTA files
## ------------------------
write.fas(ips.cox1[1:5, 1:120], block.width = 60)
## Examples for PHYLIP files
## ------------------------
write.phy(ips.cox1[1:5, 1:20], block.width = 40)
## Examples for NEXUS files
## ------------------------
x <- list(cox1 = ips.cox1[1:5, 1:10],
rna28S = ips.28S[1:5, 1:30])
write.nex(x, block.width = 20)
# Truncation of taxonnames:
# -------------------------
rownames(ips.cox1)[1] <- "AVeeeeeeeeeeeeeeeeeryLongName"
write.fas(ips.cox1, truncate = 10)
# If truncation leads to identical taxonnames,
# a warning will be issued:
# -------------------------
rownames(ips.cox1)[1:2] <- "AVeeeeeeeeeeeeeeeeeryLongName"
write.fas(ips.cox1, truncate = 10)
# }
Run the code above in your browser using DataLab