Parsing and Evaluation Tools that Provide More Details than the Default

Parsing and evaluation tools that make it easy to recreate the command line behaviour of R.


evaluate

R-CMD-check CRAN status Downloads from the RStudio CRAN mirror Codecov test coverage

evaluate provides tools that allow you to recreate the parsing, evaluation and display of R code, with enough information that you can accurately recreate what happens at the command line. Evaluate + replay works very similarly to source(), but is written in such a way to make it easy to adapt for other output formats, such as html or latex.

library(evaluate)

There are three components to the evaluate package:

  • parse_all(), a version of parse that keeps expressions with their original source code, maintaining formatting and comments.
  • evaluate(), which evaluates each expression produced by parse_all(), tracking all output, messages, warnings, and errors as their occur, and interleaving them in the correct order with the original source and value of the expression.
  • replay(), which outputs these pieces in a way that makes it look like you've entered the code at the command line. This function also serves as a template for other output formats.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("evaluate")

1.0.5 by Hadley Wickham, a year ago


https://evaluate.r-lib.org/, https://github.com/r-lib/evaluate


Report a bug at https://github.com/r-lib/evaluate/issues


Browse source code at https://github.com/cran/evaluate


Authors: Hadley Wickham [aut, cre] , Yihui Xie [aut] , Michael Lawrence [ctb] , Thomas Kluyver [ctb] , Jeroen Ooms [ctb] , Barret Schloerke [ctb] , Adam Ryczkowski [ctb] , Hiroaki Yutani [ctb] , Michel Lang [ctb] , Karolis Koncevičius [ctb] , Posit Software , PBC [cph, fnd]


Documentation:   PDF Manual  


MIT + file LICENSE license


Suggests callr, covr, ggplot2, lattice, methods, pkgload, ragg, rlang, knitr, testthat, withr


Imported by IRkernel, altdoc, bayesnec, blockr.core, commons, downlit, hera, iNZightTS, jmvconnect, knitr, learnr, mlr3, multiverse, opencpu, portfolioBacktest, rmarkdown, sasquatch, teal.code, testthat.

Suggested by Jaya, aisdk, btw, latrend, mlr3misc, mlr3pipelines, paintr, pkgdown, tibble, tikzDevice.


See at CRAN