report_op_pdf: Create a PDF report document containing RAM-OP survey results

View source: R/08-report.R

report_op_pdfR Documentation

Create a PDF report document containing RAM-OP survey results

Description

Create a PDF report document containing RAM-OP survey results

Usage

report_op_pdf(
  estimates,
  svy,
  indicators = c("demo", "food", "hunger", "disability", "adl", "mental", "dementia",
    "health", "income", "wash", "anthro", "oedema", "screening", "visual", "misc"),
  filename = "ramOPreport",
  title = "RAM-OP Report",
  view = FALSE
)

Arguments

estimates

A data.frame of RAM-OP results produced by merge_op().

svy

A data.frame collected using the standard RAM-OP questionnaire

indicators

A character vector of indicator names

filename

Filename for output document. Can be specified as a path to a specific directory where to output report document

title

Title of report

view

Logical. Open report in current PDF reader? Default is FALSE.

Value

A PDF document in the working directory or if filename is a path, to a specified directory.

Examples

classicResults <- estimate_classic(
  x = create_op(testSVY), w = testPSU, replicates = 3
)

probitResults <- estimate_probit(
  x = create_op(testSVY), w = testPSU, replicates = 3
)

resultsDF <- merge_op(x = classicResults, y = probitResults)


  if (rmarkdown::pandoc_version() >= numeric_version("1.12.3")) {
    if (tinytex::is_tinytex()) {
      report_op_pdf(
        svy = testSVY, estimates = resultsDF, indicators = "mental",
        filename = paste(tempdir(), "report", sep = "/")
      )
    }
  }



validmeasures/oldr documentation built on Feb. 12, 2025, 7:12 a.m.