Functions to be used in testthat test of the project

is_identical_to_ref(name, part = NULL, attr = NULL)

is_equal_to_ref(name, part = NULL, attr = NULL)

is_rendered(quarto, format = "html")

is_rendered_current(quarto, format = "html")

is_data(name, dir = "data", format = "rds", check_df = FALSE)

is_data_df(name, dir = "data", format = "rds", check_df = TRUE)

has_labels_all(name, part = NULL)

has_labels_any(name, part = NULL)

has_units_all(name, part = NULL)

has_units_any(name, part = NULL)

is_display_equation(text, object)

is_display_param_equation(text, object)

is_inline_equation(text, object)

is_inline_param_equation(text, object)

Arguments

name

The name of the result and reference files

part

The part(s) (list item(s)) to co=pare

attr

The attribute(s) to compare

quarto

The name of the Quarto or R Markdown file

format

The format of the rendered file. For is_rendered() or is_rendered_current() it is "html' by default. For the other function, the default is "rds"

dir

The subdirectory in the package where to look for ("data" by default)

check_df

Check if the data file contains a data frame

text

The text to check

object

The object to look for in the eq__() function

Value

TRUE if the result is identical to the reference, FALSE otherwise