View source: R/build_missingdata.R
build_missingdata | R Documentation |
Build a missing data summary report based on ContDataQC user input files.
build_missingdata(
dir_data = tempdir(),
file_data = NULL,
file_path_config = NULL,
file_path_rmd = NULL,
output_format = "html",
output_dir = tempdir(),
dayminrecpct = 90
)
dir_data |
Directory name with files. |
file_data |
Data file (CSV). |
file_path_config |
ContDataQC config file (path and file name). Default = NULL (use config.ORIG.R from extdata). |
file_path_rmd |
Path and file name of RMD used to generate the missing data summary report. Default = NULL (internal package) |
output_format |
File type for output (html only). Default = 'html' |
output_dir |
Output file path. Default = working directory |
dayminrecpct |
Minimum percent for number of daily records. Default = 90 |
This function will create a missing data summary report based on files provided by the user.
The files to use are the ones already processed by the main QC function in ContDataQC. File format is CSV.
Output is a self contained HTML file (default).
Returns summary report in the specified format (HTML, PDF, or Word).
# Copy Example files to Temp Directory
## Data
fn_data <- "DATA_test2_Aw_20130101_20141231.csv"
file.copy(file.path(path.package("ContDataSumViz"), "extdata", fn_data)
, file.path(tempdir(), fn_data))
## Config
fn_config <- "config.ORIG.R"
fp_config <- file.path(tempdir(), fn_config)
file.copy(file.path(path.package("ContDataSumViz"), "extdata", fn_config)
, fp_config)
# Render report
build_missingdata(dir_data = tempdir()
, file_data = fn_data
, file_path_config = fp_config
, file_path_rmd = NULL
, output_format = "html"
, output_dir = tempdir())
# Open Temp Directory (Windows only)
# shell.exec(tempdir())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.