Learn R Programming

dmdScheme (version 1.3.5)

print.dmdScheme_validation: 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 dmdScheme_validation
print(
  x,
  level = 1,
  listLevel = 3,
  type = "default",
  format = "markdown",
  error = c(0, 1, 2, 3, NA),
  ...
)

Value

invisibly returns x

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.

Examples

Run this code
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")
# ```

Run the code above in your browser using DataLab