gap_as_state | R Documentation |
The function gap_as_state
changes the contrast of an phyDat object to
treat as its own state. Internally phyDat
are stored similar to a
factor
objects and only the contrast matrix and some attributes
change.
gap_as_state(obj, gap = "-", ambiguous = "?")
gap_as_ambiguous(obj, gap = "-")
has_gap_state(obj)
obj |
An object of class phyDat. |
gap |
a character which codes for the gaps (default is "-"). |
ambiguous |
a character which codes for the ambiguous state |
The functions return an object of class phyDat
.
Klaus Schliep klaus.schliep@gmail.com
phyDat
, latag2n.phyDat
,
latag2n
, ancestral.pml
,
gap_as_state
data(Laurasiatherian)
tmp <- gap_as_state(Laurasiatherian)
contr <- attr(tmp, "contrast")
rownames(contr) <- attr(tmp, "allLevels")
contr
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.