print.dmdScheme_validation: Print method for 'dmdScheme_validation' object

View source: R/print.dmdScheme_validation.R

print.dmdScheme_validationR Documentation

Print method for dmdScheme_validation object

Description

When using different values for format, different outputs are generated:

  • "default"print x as list

  • "summary"print the description and errors of x as structured output, using the format as specified in the argument format

  • "details"print the details of x as structured output, using the format as specified in the argument format

Usage

## S3 method for class 'dmdScheme_validation'
print(
  x,
  level = 1,
  listLevel = 3,
  type = "default",
  format = "markdown",
  error = c(0, 1, 2, 3, NA),
  ...
)

Arguments

x

object of class dmdScheme_validation

level

level at which the header structure should start

listLevel

level at which the elements should be represented as lists and not headers anymore

type

type of output, can be either "default", "summary" or "details". Default is "default"

format

format in which the details tables should be printed. All values as used in knitr::kable() are allowed.

error

numeric v ector, containing error levels to print. Default is all error levels.

...

additional arguments for the function knitr::kable() function to format the table.

Value

invisibly returns x

Examples

x <- validate(dmdScheme_raw())

## default printout as list
x

## the same as
print(x, type = "default")

## the summary
print(x, type = "summary")

## and the details
print(x, type = "details")

## can be used in a Rmd file like:
# ```{r, results = "asis"}
#    print(result, level = 2, listLevel = 20, type = "summary")
# ```

dmdScheme documentation built on Aug. 22, 2022, 9:06 a.m.