Skip to contents

This function calls eval_function to generate a textual and graphical report of the selected variables in HTML format, and optionally opens it in the web browser.

Usage

create_report(
  DD.dict,
  DS.data,
  sex.split = FALSE,
  sex.name = NULL,
  start = 1,
  end = 1,
  non.NA.missing.codes = NA,
  output.path = tempdir(),
  open.html = TRUE,
  fn.stem = "Report"
)

Arguments

DD.dict

Data dictionary.

DS.data

Data set.

sex.split

When TRUE, split reports by the field named as defined by the sex.name variable.

sex.name

Character string specifying the name of the sex field.

start

Staring index of the first select trait.

end

Ending index of the last selected trait.

non.NA.missing.codes

A user-defined vector of numerical missing value codes (e.g., -9999).

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.

Value

Full path to the HTML report document.

Examples

# \donttest{
data(ExampleB)
create_report(DD.dict.B, DS.data.B, sex.split=TRUE, sex.name= "SEX",
   start = 3, end = 7, non.NA.missing.codes=c(-9999,-4444),
   output.path= tempdir(), open.html = FALSE)
#> 
#> 
#> processing file: dbGaP_check_report.Rmd
#> 
  |                                                               
  |                                                         |   0%
  |                                                               
  |.....                                                    |   9%             
  |                                                               
  |..........                                               |  18% (set)       
  |                                                               
  |................                                         |  27%             
  |                                                               
  |.....................                                    |  36% (ll)        
  |                                                               
  |..........................                               |  45%             
  |                                                               
  |...............................                          |  55% (parameters)
  |                                                               
  |....................................                     |  64%             
  |                                                               
  |.........................................                |  73% (applyfun5) 
  |                                                               
  |...............................................          |  82%             
  |                                                               
  |....................................................     |  91% (si)        
  |                                                               
  |.........................................................| 100%             
                                                                                                       
#> output file: dbGaP_check_report.knit.md
#> /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc +RTS -K512m -RTS dbGaP_check_report.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /var/folders/y1/p2tdt78d16b191mrhv6hsm0c0000gq/T//RtmpqrHsNA/Report-20230927_110110.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-str154cd387e5140.html 
#> 
#> Output created: /var/folders/y1/p2tdt78d16b191mrhv6hsm0c0000gq/T//RtmpqrHsNA/Report-20230927_110110.html
#> [1] "/var/folders/y1/p2tdt78d16b191mrhv6hsm0c0000gq/T//RtmpqrHsNA/Report-20230927_110110.html"
# }