dmai_reference: Published values used by the tests and vignettes

View source: R/common-reference.R

dmai_referenceR Documentation

Published values used by the tests and vignettes

Description

Reads inst/extdata/reference.csv: one row per published number, with its source, the R call that recomputes it with this package (call), the expression that extracts the number from the result (extract, in terms of x), the printed value and the digits to compare. The same file drives the test of published values and the vignette that reproduces the published examples. Each distinct call is evaluated once.

Usage

dmai_reference(source = NULL, evaluate = FALSE, level = 1)

Arguments

source

optional regular expression; keep rows whose source matches.

evaluate

logical; evaluate the rows and add columns computed and agrees (default FALSE).

level

largest level evaluated (1 = fast rows, 2 = slow rows; default 1); rows above it get NA.

Value

A data.table with columns id, source, quantity, call, extract, value, digits, level, note (and computed, agrees).

Author(s)

Muhammad Yaseen (myaseen208@gmail.com)

See Also

Other dmai utilities: dmai_notation(), dmai_save(), dmai_theme()

Examples

ref <-
  dmai_reference(
      source   = NULL
    , evaluate = FALSE
    , level    = 1
    )
ref

dmai_reference(
    source   = "."
  , evaluate = TRUE
  , level    = 1
  )


dmai documentation built on Nov. 9, 2026, 9:07 a.m.