Skip to contents

This generic function creates a report based on the object.

Usage

report(
  x,
  file = tempfile(),
  open = TRUE,
  report = "html",
  report_author = "Myself",
  report_title = "Report of something",
  ...
)

# S3 method for character
report(
  x,
  file = tempfile(),
  open = TRUE,
  report = "html",
  report_author = "Tester",
  report_title = "Validation of data against dmdScheme",
  ...
)

# S3 method for dmdScheme_validation
report(
  x,
  file = tempfile(),
  open = TRUE,
  report = "html",
  report_author = "Tester",
  report_title = "Validation of data against dmdScheme",
  ...
)

Arguments

x

object of which the report should be creted used to select a method

file

name of the file containing the generated report, including extension. If missing, ot will be saved as a temporary file in the temporary folder.

open

if TRUE, open the report. Default: TRUE

report

determines if and in which format a report of the validation should be generated. Allowed values are:

  • none: no report is generated

  • html: a html (.html) report is generated and opened

  • pdf : a pdf (.pdf) report is generated and opened

  • word: a word (.docx)report is generated and opened Additional values can be implemented by the different methods and will be documented in the Details section.

report_author

name of the author to be included in the report

report_title

title of the report to be included in the report

...

further arguments passed to or from other methods

Value

return the path and filename of the report

Details

report.character creates a report of the object returnes from a validate().

report.dmdScheme_validation creates a report of the object returnes from a validate().

Methods (by class)

  • report(character): report of a dmdScheme_validation object.

  • report(dmdScheme_validation): report of a dmdScheme_validation object.

Examples

if (FALSE) {
## This examples requires pandoc
## Report of `dmdScheme_validation`
report( scheme_path_xlsx() )
}


## Report of `dmdScheme_validation`
if (FALSE) {
# This needs pandoc to run successfully
report( validate(dmdScheme_raw()) )
report(
   x = dmdScheme_raw(),
   report = "html",
   report_author = "The Author I am",
   report_title = "A Nice Report"
)
}