dataChk | R Documentation |
Run a Series of Data Checks and Report
dataChk(
d,
checks,
id = character(0),
html = FALSE,
omit0 = FALSE,
byid = FALSE,
nrows = 500
)
d |
a data table |
checks |
a vector of expressions that if satisfied causes records to be listed |
id |
option vector of variable names to serve as IDs |
html |
set to |
omit0 |
set to |
byid |
if |
nrows |
maximum number of rows to allow to be printed |
Function to run various data checks on a data table.
Checks are run separately for each part of the expression
vector checks
. For each single expression, the variables listed in the output are all the variables mentioned in the expression plus optional variables whose names are in the character vector id
. %between% c(a,b)
in expressions is printed as [a,b]
. The output format is plain text unless html=TRUE
which also puts each table in a separate Quarto tab. See here for examples.
an invisible data frame containing variables check
(the expression checked) and n
(the number of records satisfying the expression)
Frank Harrell
## Not run:
dataChk(mydata)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.