View source: R/check_ok_selection.R
check_ok_selection | R Documentation |
Standard checks by performing descriptive statistics of
variables in the standard output data frame with OK selection.
check_ok_selection
is a wrapper for
output_rendered
.
check_ok_selection(
input = system.file("templates", "check_ok_selection.Rmd", package = "OKplan"),
output_file = paste0("Kontroll av okplan for ", purpose, " ", format(Sys.Date(),
"%Y%m%d"), ".html"),
output_dir = NULL,
data = NULL,
purpose = NULL,
plan_aar = as.numeric(format(Sys.Date(), "%Y")) + 1,
display = "browser",
...
)
input |
[ |
output_file |
[ |
output_dir |
[ |
data |
[ |
purpose |
[ |
plan_aar |
[ |
display |
[ |
... |
Other arguments to be passed to
|
Gives descriptive statistics of the OK selection. This should used to check if the number of selected units per category are in accord with the design of the surveillance programme. If any mistakes are found, one must correct in the script that generates the selection.
The check must be performed on a data frame with standardised
column names. This is ensured by using column names as defined for
"okplan" in OK_column_standards
.
The default behavior is to display the resulting html-file in the
browser. To save the result in a permanent file, use a permanent
directory as input to output_dir
. The resulting file
can also be sent by email by using additional arguments, see
output_rendered
.
If checks are missing, are unnecessary or the headings are too
cryptic, please contribute to improve the rmarkdown file
"check_ok_selection.Rmd", see
vignette("Contribute_to_OKplan", package = "OKplan")
.
Generates an html-file with the results of the checks to be displayed in the browser.
Petter Hopp Petter.Hopp@vetinst.no
## Not run:
# Checking OK selection data
purpose = "ok_virus_svin"
plan_aar = 2023
# Check
check_OK_selection(data = okplan_svin,
purpose = purpose,
plan_aar = plan_aar)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.