poissonconsulting / chk

An R package for developers to check user-supplied function arguments
https://poissonconsulting.github.io/chk/
Other
48 stars 4 forks source link

Add `chk_nrow()` and `chk_ncol()` #117

Closed joethorley closed 1 year ago

joethorley commented 1 year ago

Just easier to read and type and commonly used

chk_nrow(x, nrow = 1, upper = nrow, x_name = NULL)

joethorley commented 1 year ago

@aylapear - this one is on the table if you want

joethorley commented 1 year ago

I had a stab and it needs some thought. I'm icing for now.

joethorley commented 1 year ago

The challenge is that nrow(NA) returns NA which results in vld_nrow() returning NA not FALSE

joethorley commented 1 year ago

better to use check_data() for nrow

github-actions[bot] commented 4 months ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.