Closed DavisVaughan closed 5 years ago
I would either map over the columns of outcomes
since that would be a data frame and check the type, or I would take numeric()
and create a full data frame prototype using that. So it would look like data.frame(col1 = numeric(), col2 = numeric())
etc. Then you could use 1 call to vec_assert()
and it would take care of the rest
Not currently possible because vctrs doesn't allow "learned" factor partial types like vec_assert(x, factor())
. This would fail because it would look for something with 0 levels.
maybe we can revisit later, but for now just use validate_outcomes_are_factors()
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
Wrap
vctrs::vec_assert()
and test that each column ofoutcomes
has typeptype
.