Learn R Programming

Claddis (version 0.3.4)

BlockAligner: Align a phylogenetic matrix block

Description

Given a block of taxa and characters aligns start of character block.

Usage

BlockAligner(Block)

Arguments

Block

The raw input text.

Value

Nothing is returned, instead the aligned block is sent to the clipboard ready for pasting into a text editor.

Details

The function serves to help build NEXUS files by neatly aligning block of taxa and characters. Or in simple terms it takes inut that looks like this:

Allosaurus  012100?1011
Abelisaurus  0100???0000
Tyrannosaurus  01012012010
Yi  10101?0????

And turns it into something that looks like this:

Allosaurus     012100?1011
Abelisaurus    0100???0000
Tyrannosaurus  01012012010
Yi             10101?0????

I use this in building the NEXUS on my site, graemetlloyd.com.

Examples

Run this code
# NOT RUN {
# Build example block from above:
x <- paste(c("Allosaurus  012100?1011",
  "Abelisaurus  0100???0000",
  "Tyrannosaurus  01012012010",
  "Yi  10101?0????"), collapse = "\n")

# Look at block pre-alignment:
x

# Example block from above:
#BlockAligner(x)

# To test the response open a text editor and paste the
# contents of the clipboard.

# }

Run the code above in your browser using DataLab