R/as.matrix.mvabund.R

as.matrix.mvabund <- function(x, ...){

    if(!is.mvabund(x))
    stop("The function 'as.matrix.mvabund' can only be used for a mvabund object.")

    if(is.null(dim(x))) x <- c(x)

   	x <- as.matrix(unabund(x))
    return(x)

}
eddelbuettel/mvabund-tests documentation built on May 15, 2019, 10:30 p.m.