Skip to contents

The functions of R that instrument_base_r() leaves as they are by default, as R's own checks (make check-all) inspect their code, so they fail if it counts what runs:

Usage

base_r_exclusions()

Value

A named list of function names, by package.

Details

  • stats::pbinom(): a regression test reads the name of its native routine from its body.

  • base::simplify2array(): a regression test compares its dump() and dput().

  • methods:::rematchDefinition(): it builds the body of rematched S4 methods from its own code, which isRematched() checks.

  • The functions of base that the byte-code compiler inlines (compiler:::safeBaseInternals), whose tests check that they only call .Internal(). As they are inlined, they rarely run anyway.

  • The internal generics of base (.internalGenerics), which the tests of tools check call .Internal().

Examples

str(base_r_exclusions())
#> List of 3
#>  $ base   : chr [1:30] "simplify2array" "atan2" "besselY" "beta" ...
#>  $ methods: chr "rematchDefinition"
#>  $ stats  : chr "pbinom"

# Also leave out lm()
exclusions <- base_r_exclusions()
exclusions$stats <- c(exclusions$stats, "lm")