Converts a character string to a PhyDat object.
StringToPhyDat(string, tips, byTaxon = TRUE)StringToPhydat(string, tips, byTaxon = TRUE)
StringToPhydat(string, tips, byTaxon = TRUE)
a string of tokens, optionally containing whitespace, with no terminating semi-colon.
a character vector corresponding to the names (in order) of each taxon in the matrix
= TRUE, string is one TAXON's coding at a time; FALSE: one CHARACTER's coding at a time
This function returns a data matrix in phyDat format.
phyDat
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