R/ess-functions.R

Defines functions ess.evals ess.pander.evals

#' @keywords internal
ess.pander.evals <- function(x, show.src = TRUE) {
    require(pander, quietly = T)
    wd <- getwd()
    setwd(tempdir())
    cat('\n')
    res <- evals(x)
    for (x in res) {
        if (show.src) {
            cat('\n```r\n', paste(x$src, collapse = '\n'), '\n```\n\n', sep = '')
        }
        cat(pander(x), sep = '\n')
    }
    setwd(wd)
    cat('\n')
}

#' @keywords internal
ess.evals <- function(x) {
    require(pander, quietly = T)
    wd <- getwd()
    setwd(tempdir())
    cat('\n')
    evals(x)
    setwd(wd)
    cat('\n')
}

Try the pander package in your browser

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

pander documentation built on March 18, 2022, 6:39 p.m.