R/as.allPerms.R

Defines functions `as.allPerms`

`as.allPerms` <- function(object, control) {
    object <- as.matrix(object)
    class(object) <- c("allPerms", "matrix")
    if (!missing(control)) {
        attr(object, "control") <- control
        attr(object, "observed") <- getObserved(control)
    } else {
        ## This needs double checking that it is needed!
        attr(object, "control") <- attr(object, "observed") <- NA
    }
    object
}

Try the permute package in your browser

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

permute documentation built on March 18, 2022, 7:36 p.m.