dmdScheme (version 1.1.2)

report: Generic function for creating a report from an object x

Description

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

Methods (by class)

  • character: report of a dmdScheme_validation object.

  • dmdScheme_validation: report of a dmdScheme_validation object.

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().

Examples

Run this code
# NOT RUN {
## Report of `dmdScheme_validation`
report( scheme_path_xlsx() )

## Report of `dmdScheme_validation`
report( validate(dmdScheme_raw()) )
# }
# NOT RUN {
report(
   x = dmdScheme_raw(),
   report = "html",
   report_author = "The Author I am",
   report_title = "A Nice Report"
)
# }

Run the code above in your browser using DataLab