View source: R/assert_square.R
assert_square | R Documentation |
Checks: - duplicated rows by id_var combination - missing rows by id_var combination
assert_square(
dt,
id_varnames,
no_na_varnames = NULL,
verbose = TRUE,
hard_stop = TRUE,
stop_if_empty = TRUE
)
dt |
[data.table] table of data |
id_varnames |
[chr] vector of id variable names that, in combination (e.g. expand.grid) will uniquely ID all rows of data |
no_na_varnames |
[chr] optional (defualt NULL) vector of variable names that must not be NA to be considered 'square' |
verbose |
[lgl] print success message? |
hard_stop |
[lgl] default TRUE - stop if non-square, warn if FALSE |
[list] 2 data.tables - duplicated rows and missing rows
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.