assertr icon indicating copy to clipboard operation
assertr copied to clipboard

Feature Request: `assert_cols()`

Open billdenney opened this issue 1 year ago • 2 comments

I often want to do a set of checks on the columns of data.frames before doing checks on the values within each column itself.

For example, I want to check that all columns are present, and rather than use the has_names() function with verify(), I'd like the output to specify what column or columns are missing. Similarly, I use verify(is.numeric(numeric_column_1)) %>% verify(is.numeric(numeric_column_2)) when a cleaner report would look more like assert(is.numeric, numeric_column_1, numeric_column_2).

What would you think about an assert_cols() function?

billdenney avatar Feb 23 '23 03:02 billdenney