R/unix/getpb.R

Defines functions getpb

Documented in getpb

getpb <-
function(pb)
{
    if (dopb()) {
        progress.bar <- getOption("pboptions")$type
        rval <- switch(progress.bar,
            timer = getTxtProgressBar(pb),
            txt = getTxtProgressBar(pb),
            tk = tcltk::getTkProgressBar(pb))
        if (doshiny())
            rval <- pb$getValue()
    } else {
        rval <- NULL
    }
    rval
}

Try the pbapply package in your browser

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

pbapply documentation built on July 9, 2023, 7:41 p.m.