Skip to content
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

tidy-DataOrdinal produces incorrect results #866

Closed
Puzzled-Face opened this issue Oct 3, 2024 · 0 comments · Fixed by #867
Closed

tidy-DataOrdinal produces incorrect results #866

Puzzled-Face opened this issue Oct 3, 2024 · 0 comments · Fixed by #867
Assignees
Labels
bug Something isn't working

Comments

@Puzzled-Face
Copy link
Collaborator

Consider

.DefaultDataOrdinal() %>% tidy()
# A tibble: 10 × 11
      ID Cohort  Dose Placebo  NObs NGrid DoseGrid   XLevel Cat0  Cat1  Cat2 
   <int>  <int> <dbl> <lgl>   <int> <int> <list>      <int> <lgl> <lgl> <lgl>
 1     1      1    10 FALSE      10    10 <dbl [10]>      1 FALSE FALSE FALSE
 2     2      2    20 FALSE      10    10 <dbl [10]>      2 FALSE FALSE FALSE
 3     3      3    30 FALSE      10    10 <dbl [10]>      3 FALSE FALSE FALSE
 4     4      4    40 FALSE      10    10 <dbl [10]>      4 FALSE FALSE FALSE
 5     5      5    50 FALSE      10    10 <dbl [10]>      5 FALSE FALSE FALSE
 6     6      5    50 FALSE      10    10 <dbl [10]>      5 FALSE TRUE  FALSE
 7     7      5    50 FALSE      10    10 <dbl [10]>      5 FALSE FALSE FALSE
 8     8      6    60 FALSE      10    10 <dbl [10]>      6 FALSE FALSE FALSE
 9     9      6    60 FALSE      10    10 <dbl [10]>      6 FALSE TRUE  FALSE
10    10      6    60 FALSE      10    10 <dbl [10]>      6 FALSE FALSE TRUE

By definition, Cat0 should be equal to !(Cat1 || Cat2), but it is FALSE for all rows. The fix is straightforward: add an additional mutate to correct the default handling of Cat0.

@Puzzled-Face Puzzled-Face added the bug Something isn't working label Oct 3, 2024
@Puzzled-Face Puzzled-Face self-assigned this Oct 3, 2024
Puzzled-Face added a commit that referenced this issue Oct 3, 2024
@Puzzled-Face Puzzled-Face linked a pull request Oct 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant