R/segm.default.R

Defines functions segm.default

segm.default <- function(x, segments=1:dim(x)[3], ...) {
    if (inherits(x, "Mefa")) return(x@xtab)
    if (inherits(x, "mefa")) {
        if (!all(segments %in% 1:dim(x)[3]))
            stop("'segments' out of range")
        if (is.null(x$segm))
            return(x$xtab) else return(x$segm[segments])
    }
    stop("not mefa class")
}

Try the mefa package in your browser

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

mefa documentation built on Oct. 7, 2021, 9:11 a.m.