Skip to contents

Create an HTML report document containing RAM-OP survey results

Usage

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

Arguments

estimates

A data.frame of RAM-OP results produced by merge_estimates function.

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. Defaults to a path to a temporary directory and a filename ramOPreport.

title

Title of report

view

Logical. Open report in current browser? Default is FALSE.

Value

An HTML document in the working directory or if filename is a path, to a specified directory.

Author

Ernest Guevarra

Examples

  #
  classicResults <- estimate_classic(x = create_op_all(testSVY),
                                     w = testPSU,
                                     replicates = 9)

  probitResults <- estimate_probit(x = create_op_all(testSVY),
                                   w = testPSU,
                                   replicates = 9)

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

  report_op_html(svy = testSVY,
                 estimates = resultsDF,
                 indicators = "mental",
                 filename = paste(tempdir(), "report", sep = "/"))
#> 
#> 
#> processing file: report.Rmd
#> 1/7          
#> 2/7 [setup]  
#> 3/7          
#> 4/7 [k6Plot] 
#> 5/7          
#> 6/7 [k6Table]
#> 7/7          
#> output file: report.knit.md
#> /opt/hostedtoolcache/pandoc/3.1.11/x64/pandoc +RTS -K512m -RTS report.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output report.html --lua-filter /home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /home/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --variable bs3=TRUE --section-divs --table-of-contents --toc-depth 2 --template /home/runner/work/_temp/Library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --number-sections --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /tmp/Rtmp5tesnU/rmarkdown-str192a77c76965.html 
#> 
#> Output created: report.html