R/as.matrix.R

Defines functions as.matrix.phyDat as.logical.phylo as.matrix.phylo

#' @export
as.matrix.phylo <- function(x, ...) {
  sp <- as.Splits(x)
  as.logical(sp) * 1
}

#' @export
as.logical.phylo <- function(x, ...) {
  as.logical(as.Splits(x))
}

#' @export
as.matrix.phyDat <- function(x, ambigNA = FALSE, inappNA = ambigNA, ...) {
  PhyDatToMatrix(x, ambigNA, inappNA)
}

Try the TreeTools package in your browser

Any scripts or data that you put into this service are public.

TreeTools documentation built on June 22, 2024, 9:27 a.m.