StringToPhyDat: String to phyDat

Description Usage Arguments Value Author(s) See Also Examples

Description

Converts a PhyDat object to allow processing by MorphyDat

Usage

1
StringToPhyDat(string, tips, byTaxon = TRUE)

Arguments

string

a string of tokens, optionally containing whitespace, with no terminating semi-colon. Polytomies not (yet) supported; each character must correspond to a unique state, ?, or the inapplicable token (-)

tips,

a character vector corresponding to the names (in order) of each taxon in the matrix

byTaxon

= TRUE, string is one TAXON's coding at a time; FALSE: one CHARACTER's coding at a time

Value

This function returns a data matrix in phyDat format.

Author(s)

Martin R. Smith

See Also

phyDat

Examples

1
2
3
4
morphy <- StringToPhyDat("-?01231230?-", c('Lion', 'Gazelle'), byTaxon=TRUE)
# encodes the following matrix:
# Lion     -?0123
# Gazelle  1230?-

ms609/inapplicable documentation built on May 23, 2019, 7:49 a.m.