This function generates an awareness report in HTML format, and optionally opens it in the web browser.
Usage
create_awareness_report(
DD.dict,
DS.data,
non.NA.missing.codes = NA,
threshold = 95,
output.path = tempdir(),
open.html = TRUE,
fn.stem = "AwarenessReport"
)
Arguments
- DD.dict
Data dictionary.
- DS.data
Data set.
- non.NA.missing.codes
A user-defined vector of numerical missing value codes (e.g., -9999).
- threshold
Threshold for missingness of concern (as a percent).
- output.path
Path to the folder in which to create the HTML report document.
- open.html
If TRUE, open the HTML report document in the web browser.
- fn.stem
File name stem.
Examples
# \donttest{
data(ExampleB)
create_awareness_report(DD.dict.B, DS.data.B, non.NA.missing.codes=c(-9999),
output.path= tempdir(), open.html = FALSE)
#>
#>
#> processing file: dbGaP_awareness_report.Rmd
#>
|
| | 0%
|
|... | 6%
|
|....... | 11% (su)
|
|.......... | 17%
|
|............. | 22% (param)
|
|................ | 28%
|
|.................... | 33% (misssum)
|
|....................... | 39%
|
|.......................... | 44% (vmt1a)
|
|.............................. | 50%
|
|................................. | 56% (vmt2b)
|
|.................................... | 61%
|
|....................................... | 67% (vmt3c)
|
|........................................... | 72%
|
|.............................................. | 78% (vmt4d)
|
|................................................. | 83%
|
|.................................................... | 89% (vmt4e)
|
|........................................................ | 94%
|
|...........................................................| 100% (sess_inf)
#> output file: dbGaP_awareness_report.knit.md
#> /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc +RTS -K512m -RTS dbGaP_awareness_report.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /var/folders/y1/p2tdt78d16b191mrhv6hsm0c0000gq/T//RtmpqrHsNA/AwarenessReport-20230927_110109.html --lua-filter /Users/law145/Library/R/arm64/4.2/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Users/law145/Library/R/arm64/4.2/library/rmarkdown/rmarkdown/lua/latex-div.lua --embed-resources --standalone --variable bs3=TRUE --section-divs --table-of-contents --toc-depth 3 --template /Users/law145/Library/R/arm64/4.2/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 /var/folders/y1/p2tdt78d16b191mrhv6hsm0c0000gq/T//RtmpqrHsNA/rmarkdown-str154cd4afc2d86.html
#>
#> Output created: /var/folders/y1/p2tdt78d16b191mrhv6hsm0c0000gq/T//RtmpqrHsNA/AwarenessReport-20230927_110109.html
#> [1] "/var/folders/y1/p2tdt78d16b191mrhv6hsm0c0000gq/T//RtmpqrHsNA/AwarenessReport-20230927_110109.html"
# }