read.nexus.data {ape}R Documentation

Read Character Data In NEXUS Format

Description

read.nexus.data reads a file with sequences in the NEXUS format. nexus2DNAbin is a helper function to convert the output from the previous function into the class "DNAbin".

For the moment, only sequence data (DNA or protein) are supported.

Usage

read.nexus.data(file)
nexus2DNAbin(x)

Arguments

file

a file name specified by either a variable of mode character, or a double-quoted string.

x

an object output by read.nexus.data.

Details

This parser tries to read data from a file written in a restricted NEXUS format (see examples below).

Please see files ‘data.nex’ and ‘taxacharacters.nex’ for examples of formats that will work.

Some noticeable exceptions from the NEXUS standard (non-exhaustive list):

Value

A list of sequences each made of a single vector of mode character where each element is a (phylogenetic) character state.

Author(s)

Johan Nylander, Thomas Guillerme, and Klaus Schliep

References

Maddison, D. R., Swofford, D. L. and Maddison, W. P. (1997) NEXUS: an extensible file format for systematic information. Systematic Biology, 46, 590–621.

See Also

read.nexus, write.nexus, write.nexus.data

Examples

## Use read.nexus.data to read a file in NEXUS format into object x
## Not run: x <- read.nexus.data("file.nex")

[Package ape version 5.8 Index]