powered by
phyDat
Converts a character string to a phyDat object.
StringToPhyDat(string, tips, byTaxon = TRUE)StringToPhydat(string, tips, byTaxon = TRUE)
StringToPhydat(string, tips, byTaxon = TRUE)
String of tokens, optionally containing whitespace, with no terminating semi-colon.
Character vector corresponding to the names (in order) of each taxon in the matrix.
Logical; if TRUE, string is one taxon's coding at a time; if FALSE, string is interpreted as one *character's coding at a time.
TRUE
FALSE
This function returns a data matrix in phyDat format.
PhyToString
# NOT RUN { morphy <- StringToPhyDat("-?01231230?-", c('Lion', 'Gazelle'), byTaxon = TRUE) # encodes the following matrix: # Lion -?0123 # Gazelle 1230?- # }
Run the code above in your browser using DataLab