We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
stat
For example:
testProp %>% createQtlBubblePlot( x=Snapshot, y=proportion, summarise=TRUE, stat=weighted.mean, w=n_patients, group=COUNTRY, size=n_patients, limits = list( list(label = "QTL (12%)", colour = "red", type = "dashed", y = 0.12, x = 1.5, vjust = -1), list(label = "Sec Lim (8%)", colour = "goldenrod", type = "dotted", y = 0.08, x = 3, vjust = -0.5) ), boxLeft = -2, boxRight = 4 ) + guides(colour=guide_legend(ncol=2)) + coord_cartesian(xlim=c(-4, 6)) #> Error in `dplyr::summarise()`: #> ! Problem while computing `proportion = stat(proportion, ...)`. #> ℹ The error occurred in group 1: COUNTRY = "AUS", Snapshot = "2022-11-25". #> Caused by error in `weighted.mean.default()`: #> ! object 'n_patients' not found
This appears to be because weighted.average does not data-mask its arguments.
weighted.average
group_by(COUNTRY, Snapshot) %>% summarise( proportion=weighted.mean(proportion, w=n_patients), n_patients=sum(n_patients), .groups="drop" ) %>% createQtlBubblePlot( x=Snapshot, y=proportion, group=COUNTRY, size=n_patients, limits = list( list(label = "QTL (12%)", colour = "red", type = "dashed", y = 0.12, x = 1.5, vjust = -1), list(label = "Sec Lim (8%)", colour = "goldenrod", type = "dotted", y = 0.08, x = 3, vjust = -0.5) ), boxLeft = -2, boxRight = 4 ) + guides(colour=guide_legend(ncol=2)) + coord_cartesian(xlim=c(-4, 6))
works as expected.
The text was updated successfully, but these errors were encountered:
When branches are created from issues, their pull requests are automatically linked.
For example:
This appears to be because
weighted.average
does not data-mask its arguments.works as expected.
The text was updated successfully, but these errors were encountered: