Compare two functions line by line using diff
diff_functions(
f1,
f2,
width = NULL,
wide = TRUE,
trim_whitespace = FALSE,
verbose = FALSE,
...
)function expected to be passed by function name.
function expected to be passed by function name.
integer number of columns to allow in output.
logical indicating whether to use wide output
from diff, which prints the two functions side by side.
logical indicating whether to trim leading
and trailing whitespace on each function line to avoid differences
defined only by the indentation of text.
logical indicating whether to print verbose output.
additional arguments are ignored.
None. This function is called for its output, which
can be captured with utils::capture.output().
This function is a utility wrapper around linux commandline
tool diff, used to compare the text representation of two
R functions.
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()
diff_functions(base::grepl, base::agrepl)
#> ## (13:43:21) 10Jun2024: f1_name: base..grepl
#> ## (13:43:21) 10Jun2024: f1_file: /var/folders/1v/hbvdjhy1293cvqlm7n6l_hxw0000gs/T//RtmpC2aygF/base..grepl.R
#> ## (13:43:21) 10Jun2024: f2_name: base..agrepl
#> ## (13:43:21) 10Jun2024: f2_file: /var/folders/1v/hbvdjhy1293cvqlm7n6l_hxw0000gs/T//RtmpC2aygF/base..agrepl.R
#> [1] "diff -W 80 -y /var/folders/1v/hbvdjhy1293cvqlm7n6l_hxw0000gs/T//RtmpC2aygF/base..grepl.R /var/folders/1v/hbvdjhy1293cvqlm7n6l_hxw0000gs/T//RtmpC2aygF/base..agrepl.R"