R/as.rad.R

"as.rad" <-
    function(x)
{
    if (inherits(x, "rad"))
        return(x)
    take <- x > 0
    nm <- names(x)
    comm <- x[take]
    names(comm) <- nm[take]
    comm <- rev(sort(comm))
    class(comm) <- "rad"
    comm
}
pattakosn/Rworkshop documentation built on May 24, 2019, 8:22 p.m.