getTBinR 0.7.0 should now be available on CRAN. This release includes some new experimental data (TB incidence by age and sex) that for now is only partly supported by {getTBinR} . It also brings {getTBinR} into line with new (or new to me) {ggplot2} best practices. This involved two major changes (plans are also afoot for an S3 plot method):

Moving from a full @import of {ggplot2} to only using @importFrom for required functions (something that I had previously been too lazy to do…). Dropping aes_string , which is now soft depreciated, in favour of aes and rlang::.data for programmatic variables (Note: Yes I could have more fully embraced rlang here but this would have required some major breaking package changes). This was a real joy as aes_string has always been a bit clunky to use and resulted in very messy looking code. A simple pseudo-code example of this can be seen below.

library(ggplot2) ## Variable to plot y_var <- "disp" ## Old getTBinR approach for programming across variables ggplot(mtcars, aes_string(x = "cyl", y = y_var)) + geom_point() ## New getTBinR approach using rlang ggplot(mtcars, aes(x = cyl, y = .data[[y_var]])) + geom_point() + ## This is now needed to get the correct label - a small price to pay. labs(y = y_var)

Wrapping up this release are several bug fixes for the embedded {shiny} app and {rmarkdown} report. Hopefully, {getTBinR} is now ready to be presented next week at R medicine (see your there)! The full change log is included below (or can be found here). See the bottom of this post for an example of using the new age and sex stratified incidence data.

getTBinR 0.7.0