We will here use the swimmer_plot function and the dataset created in the Data & Function page.
# Libraries
library(ggplot2)
library(swimplot)#Most basic swimmer plot
swimmer_plot(df=swimdata,id='SUBJID',end='survie',
name_fill='Bestrep',
width=.85)+
xlab("ID")+
ylab("Time (in days)")
This document is a work by Emma Lafaurie (emma.lafaurie@inserm.fr) for the SBIM (Service de Biostatistique et Information Médicale) at Saint-Louis Hospital in Paris.
Based on the template of Yan Holtz.