R

Allo-Wheel, Shiny App

App created in R/Shiny to illustrate the complexities of alloimmunization. This should NOT be taken as medical advice, but feel free to explore the allo-wheel. Link to the code here App hosted here

Medical Automation with Siri and Javascript

Recently, I discovered the incredible power of Siri Shortcuts in iOS. If you are unfamiliar with Siri Shortcuts, they allow you to automate daily tasks on your phone, and are typically used to interact with existing apps. However, did you know that Siri can be programmed to interpret Javascript using the Safari web browser on your phone? _(Huge thanks to the following tutorial for clearly outlining how to set up this functionality.

Hemolytic disease of the fetus and newborn, Shiny App

App created in R/Shiny to illustrate fetal physiology. This should NOT be taken as medical advice, but feel free to play around with the inputs. Note, this an approximation: the decline in fetal hematocrit (hct) seen here will vary depending upon the degree to which fetal erythropoeisis has been suppressed by prior transfusions. Clearly, using a combined IVT+IPT approach maintains a higher post-transfusion hct compared with IVT alone. Link to the code here

GT tables

In my job, I make tables all the time I recently stumbled upon the {gt} package and whoa… these are some great looking tables! You can check out the documentation here Even better, they are easy to append to any dplyr pipeline… Step 1: Load {gt} and {dplyr} library(gt) library(dplyr)  Step 2: Create a frequency table with mtcars, grouped by number of cylinders. Dplyr is quick and simple to use, but the console output is not so easy on the eyes… mtcars %>% group_by(cyl) %>% summarize(N = n()) %>% mutate(Frequency = N/sum(N), Frequency = round(Frequency, 2)) ## # A tibble: 3 x 3 ## cyl N Frequency ## <dbl> <int> <dbl> ## 1 4 11 0.