Closed tdwils closed 1 year ago
+1
Agreed. This error has been a roadblock for our team @ Biogen as of {Tplyr}
v1.0.1. In the meantime, we are requiring our users to use v0.4.4.
Thanks for the report! I've verified this and we're looking into it!
@elimillera error comes from here https://github.com/atorus-research/Tplyr/blob/d84e0653120766991fbefea4463c6500fb25b8ac/R/count.R#L670
The issue is that denom_where
is AEREL != "None"
, so the layer level where is overwriting the population where - which given the pop data, that shouldn't be the case.
Also @tdwils kudos on a really well written bug report!
Thanks @tdwils and @AARON-CLARK. The branch 'bug-fix/issue-106' should have this resolved if you are able to give it a check.
@elimillera Thank you for the quick response! I have confirmed that this issue has been resolved.
Do you have an estimate for when this would be pushed to CRAN?
@tdwils we'll definitely push it up by early next week - I have some comments to Eli to look through but we'll get it pushed back up ASAP.
@tdwils and @AARON-CLARK On it's way to CRAN!
Thank you!
Prerequisites
Background: For tables that require more than one section of group counts, a separate filter needs to be applied for each group count. For example, an adverse events summary table shows the number of AEs that are related (
AEREL != "NONE"
), serious (AESER == "Y"
), etc. Eachgroup_count()
needs its own filter.Description
After updating
{Tplyr}
from v0.4.4 to v1.0.1, the behavior of thewhere
option seems to have changed. When the target dataset is different from the population dataset, and thewhere
condition is placed in thegroup_count()
function, an error is now produced byget_numeric_data()
andbuild()
.If the target and population datasets are the same, or if the
where
is placed in thetplyr_table()
function, then it runs without error.Steps to Reproduce
Reproducible example: target dataset = adae population dataset = adsl filter for this layer:
AEREL != "NONE"
Expected behavior:
get_numeric_data(t)
andbuild(t)
run without error.Actual behavior:
Versions
Let me know if you need any other information. Thank you!