-
Notifications
You must be signed in to change notification settings - Fork 12
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
Fix #747 - Remove N from Assess() Functions #753
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, @collleenmclaughlin!
Just a few minor tweaks noted in the review and below:
- Take a look at the documentation and make sure to remove the references to
N
(like seen here). - After you've removed the references to
N
in the documentation, be sure to rundevtools::document()
to update the documentation, and then commit and push those changes.
R/Visualize_Score.R
Outdated
if (all(c("Numerator", "Denominator") %in% names(dfFlagged))) { | ||
sum(dfFlagged$Numerator) / sum(dfFlagged$Denominator) | ||
} else { | ||
sum(dfFlagged$N) / sum(dfFlagged$TotalCount) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since dfFlagged
across all assessments should now contain Numerator
and Denominator
, we should take out the ifelse
and replace with:
yintercept = sum(dfFlagged$Numerator) / sum(dfFlagged$Denominator)
R/Analyze_Fisher.R
Outdated
@@ -50,7 +50,7 @@ Analyze_Fisher <- function( | |||
) { | |||
stopifnot( | |||
"dfTransformed is not a data.frame" = is.data.frame(dfTransformed), | |||
"One or more of these columns: GroupID, N, or the value in strOutcome not found in dfTransformed" = all(c("GroupID", "N", strOutcome) %in% names(dfTransformed)), | |||
"One or more of these columns: GroupID, or the value in strOutcome not found in dfTransformed" = all(c("GroupID", strOutcome) %in% names(dfTransformed)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor suggestion, but as we've removed variables, it might be good to change to:
"GroupID or the value found in strOutcome not found in dfTransformed"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @collleenmclaughlin!
Updated Supporting Functions for
Assess()
Functions to Remove $NRelated Issue: #747
Changes affect
AE_Assess()
,Consent_Assess()
,Disp_Assess()
,IE_Assess()
,LB_Assess()
, andPD_Assess()
functionsUpdates Made:
Analyze_Fisher.R
,Analyze_Poisson.R
,Summarize.R
- removed N fromstopifnot
section and fromselect()
Visualize_Score.R
- removedsum(dfFlagged$N) / sum(dfFlagged$TotalCount)
Transform_Count.R
,Transform_Rank.R
- removed N fromsummarize()
Test Notes:
Once codes above were updated, I ran the codes under @examples in respective
Assess()
function