write_doc_factory_map_conventions {scrutiny}R Documentation

Documentation template for function factory conventions

Description

write_doc_factory_map_conventions() creates a roxygen2 block section to be inserted into the documentation of a function factory such as function_map_seq() or function_map_total_n(). It lays out the naming guidelines that users of your function factory should follow when creating new manufactured functions.

Copy the output from your console and paste it into the roxygen2 block of your function factory.

Usage

write_doc_factory_map_conventions(
  ending,
  name_test1 = "GRIM",
  name_test2 = "GRIMMER",
  scrutiny_prefix = FALSE
)

Arguments

ending

String (length 1). The part of your function factory's name after function_map_. To

name_test1, name_test2

Strings (length 1 each). Plain-text names of example consistency tests. Defaults are "GRIM" and "GRIMMER", respectively.

scrutiny_prefix

Logical (length 1). Should the scrutiny functions mentioned in the output have a ⁠scrutiny::⁠ namespace specification? Set this to TRUE if the output will go into another package's documentation. Default is FALSE.

Value

A string vector formatted by glue::glue().

See Also

For context, see Implementing consistency tests.

Examples

# For `function_map_seq()`:
write_doc_factory_map_conventions(ending = "seq")

# For `function_map_total_n()`:
write_doc_factory_map_conventions(ending = "total_n")

[Package scrutiny version 0.4.0 Index]