R/image_phyDat.R

Defines functions image.phyDat

Documented in image.phyDat

#' Plot of a Sequence Alignment
#'
#' This function plots an image of an alignment of sequences.
#'
#' A wrapper for using \code{\link{image.DNAbin}} and \code{\link{image.AAbin}}.
#' @param x	 an object containing sequences, an object of class \code{phyDat}.
#' @param ... further arguments passed to or from other methods.
#' @seealso \code{\link{image.DNAbin}}, \code{\link{image.AAbin}}
#' @method image phyDat
#' @export
image.phyDat <- function(x, ...){
  if(attr(x, "type") == "AA") image(as.AAbin(x), ...)
  if(attr(x, "type") == "DNA") image(as.DNAbin(x), ...)
  else return(NULL)
}

Try the phangorn package in your browser

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

phangorn documentation built on Jan. 23, 2023, 5:37 p.m.