R/as.matrix.mvabund.R

Defines functions as.matrix.mvabund

Documented in as.matrix.mvabund

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)

}
aliceyiwang/mvabund documentation built on March 13, 2024, 1:58 a.m.