Rstats

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

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.