Description Usage Arguments Details Author(s)
This function allows you to pass in lists of arguments defining tests on different variables
of a dataframe. Each list should contain "vars" and "checks" named arguments, along with other named arguments
to be passed to the checkDF
function. You can also pass single named arguments for checkDF
which will be checked separately at the end.
1 | doDFchecks(df, ...)
|
df |
A dataframe on which to perform the checks. |
... |
Lists of arguments, or individual arguments for |
A test specification takes the form of a list of named arguments to checkDF
.
Each list containing "vars" and "checks" named arguments will invoke a separate call to the checkDF
function, and the matching columns of df will be checked. Any other named arguments will be aggregated
together and used in a single call to checkDF
after all the variable specific checks have finished.
If the same named argument (apart from "vars" and "checks") appears more than once (either in different lists, or separately)
it will only be used once at the end. This means you can create predefined test specifications and use them together,
without worrying about overlap.
This is useful when you need to check multiple dataframes which may share some data of the same type. In this case you can
predefine tests for the different types of variables, and perhaps also some general tests about the dimensions of the
dataframe, number of missing values etc. Then for each dataframe you can call this function with the appropriate test
specifications.
See the examples section for examples of how to define test specifications.
Ben Veal
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.