Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

MatrixToPhyDat

Convert between matrices and phyDat objects


Description

MatrixToPhyDat() converts a matrix of tokens to a phyDat object; PhyDatToMatrix() converts a phyDat object to a matrix of tokens.

Usage

MatrixToPhyDat(tokens)

PhyDatToMatrix(dataset)

Arguments

tokens

matrix of tokens, probably created with ReadCharacters() or ReadTntCharacters(). Row names should correspond to tip labels; column names may optionally correspond to character labels.

dataset

A dataset of class phyDat.

Value

MatrixToPhyDat() returns an object of class phyDat.

PhyDatToMatrix() returns a matrix corresponding to the uncompressed character states within a phyDat object.

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

See Also

Other phylogenetic matrix conversion functions: StringToPhyDat()


TreeTools

Create, Modify and Analyse Phylogenetic Trees

v1.4.4
GPL (>= 3)
Authors
Martin R. Smith [aut, cre, cph] (<https://orcid.org/0000-0001-5660-1727>), Emmanuel Paradis [cph] (<https://orcid.org/0000-0003-3092-2199>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.