diff_functions: Compare two functions line by line using diff

diff_functionsR Documentation

Compare two functions line by line using diff

Description

Compare two functions line by line using diff

Usage

diff_functions(
  f1,
  f2,
  width = NULL,
  wide = TRUE,
  trim_whitespace = FALSE,
  verbose = FALSE,
  ...
)

Arguments

f1

function expected to be passed by function name.

f2

function expected to be passed by function name.

width

integer number of columns to allow in output.

wide

logical indicating whether to use wide output from diff, which prints the two functions side by side.

trim_whitespace

logical indicating whether to trim leading and trailing whitespace on each function line to avoid differences defined only by the indentation of text.

verbose

logical indicating whether to print verbose output.

...

additional arguments are ignored.

Details

This function is a utility wrapper around linux commandline tool diff, used to compare the text representation of two R functions.

Value

None. This function is called for its output, which can be captured with utils::capture.output().

See Also

Other jam practical functions: breakDensity(), checkLightMode(), check_pkg_installed(), colNum2excelName(), color_dither(), exp2signed(), fileInfo(), fixYellow(), getAxisLabel(), handleArgsText(), heads(), isFALSEV(), isTRUEV(), jamba, jargs(), kable_coloring(), lldf(), log2signed(), make_html_styles(), make_styles(), match_unique(), mergeAllXY(), middle(), minorLogTicks(), newestFile(), printDebug(), renameColumn(), rmInfinite(), rmNAs(), rmNA(), rmNULL(), sclass(), sdim(), setPrompt()

Examples

diff_functions(base::grepl, base::agrepl)


jmw86069/jamba documentation built on March 26, 2024, 5:26 a.m.