Skip to contents

Check that a dataframe is empty in a pipeable style.
Mostly useful for sanity checks.

Usage

assert_no_rows(df, msg = NULL)

Arguments

df

a dataframe

msg

(optional) a custom message to be output (e.g. with the underlying reason)

Value

nothing

Examples

tm = edc_example()
#> Warning: Option "edc_lookup" has been overwritten.
tm$db0 %>% dplyr::filter(age>100) %>% assert_no_rows()