R/popelem.wprof.R

Defines functions popelem.wprof

Documented in popelem.wprof

popelem.wprof <-
function(prof, y, ...) {
    if (is.null(dim(y))) y <- t(y)
    res <- apply(y, 1, function(x) {
        tmp <- apply(prof$profiles, 1, function(p) all(p == x))
        if (sum(tmp)==1)
            return(which(tmp))
        else
            return(NA)
    })
    names(res) <- rownames(y)
    return(res)
}

Try the parsec package in your browser

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

parsec documentation built on Aug. 19, 2023, 5:07 p.m.