
Create a PDF report document containing RAM-OP survey results
Source:R/08-report.R
report_op_pdf.Rd
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.
Examples
classicResults <- estimate_classic(
x = create_op(testSVY), w = testPSU, replicates = 3
)
#> ℹ Checking if demo, food, hunger, disability, adl, mental, dementia, health, income, wash, anthro, oedema, screening, visual, misc are RAM-OP indicators
#> ✔ All of `indicators` are RAM-OP indicators
#> ✔ x has the appropriate/expected data structure
#> ✔ x has the appropriate/expected data structure
#> ✔ x has the appropriate/expected data structure
probitResults <- estimate_probit(
x = create_op(testSVY), w = testPSU, replicates = 3
)
#> ℹ Checking if demo, food, hunger, disability, adl, mental, dementia, health, income, wash, anthro, oedema, screening, visual, misc are RAM-OP indicators
#> ✔ All of `indicators` are RAM-OP indicators
#> ✔ x has the appropriate/expected data structure
#> ✔ x has the appropriate/expected data structure
#> ✔ x has the appropriate/expected data structure
#> ✔ x has the appropriate/expected data structure
#> ✔ x has the appropriate/expected data structure
#> ✔ x has the appropriate/expected data structure
resultsDF <- merge_op(x = classicResults, y = probitResults)
# \donttest{
report_op_pdf(
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 latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output report.tex --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 --table-of-contents --toc-depth 2 --number-sections --highlight-style tango --pdf-engine pdflatex --variable graphics --include-in-header /tmp/RtmpqK3xDJ/rmarkdown-str1eef67b6ad57.html --variable 'geometry:margin=1in'
#> Warning: error in running command
#> ! sh: 1: pdflatex: not found
#> Error: LaTeX failed to compile report.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See report.log for more info.
# }