check_dm {vigicaen} | R Documentation |
Check binary variables
Description
Quick check
that your data management steps through
add_adr
or add_drug
found cases.
Usage
check_dm(.data, cols)
Arguments
.data |
A data.frame to be checked |
cols |
A character vector, name of columns to look at (usually will be |
Details
It is a simple wrapper around dplyr::summarise()
.
Be careful not to supply factors with > 2 levels or continuous outcome
(the function does NOT have a checker for this, so that it is faster).
Also, the function WONT work with NAs. Use desc_facvar()
.
if you need more detailed description of your dataset.
Value
A transposed data.frame, with row.names equal to cols
, and first column
is the number of lines in .data
where each col is equal to 1
.
See Also
desc_facvar()
, add_adr()
, add_drug()
Examples
# first create some new variables
demo <- demo_
demo <-
demo |>
add_adr(
a_code = ex_$a_llt,
adr_data = adr_
)
# then check the number of reports with each feature
demo |>
check_dm(names(ex_$a_llt))
[Package vigicaen version 0.15.6 Index]