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)

}

Try the mvabund package in your browser

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

mvabund documentation built on March 18, 2022, 7:25 p.m.