Basic Swimmer Plot



We will here use the swimmer_plot function in the Data & Function page.

# Libraries
library(ggplot2)
library(swimplot)
#Basic swimmer plot
arm_plot <- swimmer_plot(df=ClinicalTrial.Arm,id='id',start = 0, end='End_trt',name_fill='Arm',
                         id_order='Arm',col="black",alpha=0.75,width=.8) +
            theme(axis.text.y=element_blank(), # Not display id axis
                  axis.ticks.y=element_blank())
arm_plot




Contact

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.