-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: assert_cols()
#121
Comments
I really like that idea. I'd like to make sure the semantics operate a lot like I think a lot of great functionality could come from
|
Yeah, that covers a lot of the space I was thinking of. Generally, I'm thinking that it would be used two few different ways:
I see the above two as different ways to use the data, so I'd think they would either be two different functions (e.g. FYI, https://sfirke.github.io/janitor/reference/clean_names.html can help a lot with rational column naming, but it is a correction function rather than a checking function. What do you think? Are there other use cases? |
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 withverify()
, I'd like the output to specify what column or columns are missing. Similarly, I useverify(is.numeric(numeric_column_1)) %>% verify(is.numeric(numeric_column_2))
when a cleaner report would look more likeassert(is.numeric, numeric_column_1, numeric_column_2)
.What would you think about an
assert_cols()
function?The text was updated successfully, but these errors were encountered: