R/tab2mat.R

Defines functions tab2mat

Documented in tab2mat

#' Table to Matrix
#'
#' Convert table (including xtabs) to matrix.
#'
#' @param x a table.
#'
#' @return Matrix with same data as \code{x}.
#'
#' @export

tab2mat <- function(x)
{
  as.matrix(as.data.frame(unclass(x)))
}
arnima-github/arni documentation built on Oct. 28, 2023, 6:18 p.m.