check_data() does not check factor levels fully (297) - #298
Conversation
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
- Empty factor values (factor()) again check class only, as documented - Remove chk_gt(nlevels(x)) which leaked the internal variable name and failed zero-length columns - Remove dead chk_subset(unique(values), ...) check - Update details documentation to describe the new factor semantics Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Breaking change: code matching the previous message text will need updating. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A values factor with less than two levels no longer checks levels: factor(1) allows any factor without missing values, factor(c(1, NA)) any factor with or without missing values and factor(NA) any factor with all missing values. Levels must be identical, including order, only when values has two or more levels. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
joethorley
left a comment
There was a problem hiding this comment.
See modifications including slight change in behaviour different to discussed
|
happy to pull #301 once it is complete into this PR |
Resolves the parse error in test-check-data.R introduced by #301 while keeping the empty-factor test case. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Code Review
Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.
Tip: disable this comment in your organization's Code Review settings.
fixes #297. changes made: