This function runs a single check in the sdtmchecks package. It expects a check name, the function that performs the check and some info for the pdf and Excel files. It also expects a T/F value that determines whether to display messages while running. Excluding verbose, the parameters for this function are usually passed to it by filtering the metads to only contain the row corresponding to the check of interest, and then assigning each parameter as the contents of the eponymous column of metads (see example below). This is because this function is mostly run inside of an mcmapply in the run_all_checks_parallel function, which loops over the checks in the rows of metads.

run_check(
  check,
  fxn_in,
  xls_title,
  pdf_title,
  pdf_subtitle,
  pdf_return,
  verbose
)

Arguments

check

Check name.

fxn_in

Function performing the check.

xls_title

Excel title.

pdf_title

PDF title.

pdf_subtitle

PDF subtitle.

pdf_return

Text to display in PDF if check does not run.

verbose

Whether to display messages while running

Value

list with results from the check.

Details

to look up documentation for the data checks package, please use command ??sdtmchecks

See also

Example programs for running data checks diff_reports(), report_to_xlsx(), run_all_checks()

Examples


if (FALSE) {

# Assuming sdtm datasets are in your global environment

metads <- sdtmchecksmeta[1,] # Filter sdtmchecksmeta so that only one check is present

rec <- run_check(
  check = metads$check,
  fxn_in = metads$fxn_in,
  xls_title = metads$xls_title,
  pdf_title = metads$pdf_title,
  pdf_subtitle = metads$pdf_subtitle,
  pdf_return = metads$pdf_return,
  verbose = T
)
}