R/fitted.prcurve.R

Defines functions `fitted.prcurve`

`fitted.prcurve` <- function(object, type = c("curve","smooths"), ...) {
    type <- match.arg(type)
    if (isTRUE(all.equal(type, "curve"))) {
        f <- object$s
    } else if (isTRUE(all.equal(type, "smooths"))) {
        f <- sapply(object$smooths, fitted)
        dimnames(f) <- dimnames(object$data)
        attr(f, "tag") <- object$tag
    } else {
        stop("Invalid 'type'")
    }
    f
}

Try the analogue package in your browser

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

analogue documentation built on June 21, 2021, 1:08 a.m.