R/myformatg.R

myformatg <- function (x, digits = getOption("digits"), format = paste0("%.", 
    digits, "g"))
{
    if (!is.numeric(x)) 
        stop("'x' must be a numeric vector")
    temp <- sprintf(format, x)
    if (is.matrix(x)) 
        matrix(temp, nrow = nrow(x))
    else temp
}

Try the StatMethRank package in your browser

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

StatMethRank documentation built on Jan. 15, 2017, 8:59 p.m.