count: false .panel1-the_chunk-auto[ ``` r *library(ggswim) ``` ] .panel2-the_chunk-auto[ ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) *library(ggplot2) ``` ] .panel2-the_chunk-auto[ ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) *patient_data ``` ] .panel2-the_chunk-auto[ ``` # A tibble: 53 × 4 pt_id disease_assessment start_time end_time <chr> <chr> <dbl> <dbl> 1 01 CR/CRi + B Cell Recovery -2.8 0 2 01 RD 0 0.9 3 01 CR/CRi + B Cell Aplasia 0.9 1.8 4 01 CR/CRi + B Cell Recovery 1.8 2 5 02 RD -2.8 0 6 02 CRi 0 0.2 7 03 CR/CRi + B Cell Recovery -2.4 0 8 03 CR/CRi + B Cell Recovery 0 0.9 9 03 CR/CRi + B Cell Aplasia 0.9 2.8 10 03 CR/CRi + B Cell Aplasia 2.8 6.2 # ℹ 43 more rows ``` ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> * ggplot() ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_04_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + * aes(x = start_time, * y = pt_id) ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_05_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + * theme_ggswim() ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_06_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + theme_ggswim() + * geom_swim_lane(aes( * xend = end_time, * color = disease_assessment) ) ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_07_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + theme_ggswim() + geom_swim_lane(aes( xend = end_time, color = disease_assessment) ) + * scale_color_brewer( * name = "Overall Disease Assessment", * palette = "Set1" * ) ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_08_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + theme_ggswim() + geom_swim_lane(aes( xend = end_time, color = disease_assessment) ) + scale_color_brewer( name = "Overall Disease Assessment", palette = "Set1" ) + * new_scale_color() ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_09_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + theme_ggswim() + geom_swim_lane(aes( xend = end_time, color = disease_assessment) ) + scale_color_brewer( name = "Overall Disease Assessment", palette = "Set1" ) + new_scale_color() + * geom_swim_point( * data = infusion_events, * aes(x = time_from_initial_infusion, * color = infusion_type), * size = 5 * ) ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_10_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + theme_ggswim() + geom_swim_lane(aes( xend = end_time, color = disease_assessment) ) + scale_color_brewer( name = "Overall Disease Assessment", palette = "Set1" ) + new_scale_color() + geom_swim_point( data = infusion_events, aes(x = time_from_initial_infusion, color = infusion_type), size = 5 ) + * geom_swim_label( * data = end_study_events, * aes(x = time_from_initial_infusion, * label_vals = end_study_label, * label_names = end_study_name, * color = NULL), * label.size = NA, fill = NA, size = 5 * ) ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_11_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + theme_ggswim() + geom_swim_lane(aes( xend = end_time, color = disease_assessment) ) + scale_color_brewer( name = "Overall Disease Assessment", palette = "Set1" ) + new_scale_color() + geom_swim_point( data = infusion_events, aes(x = time_from_initial_infusion, color = infusion_type), size = 5 ) + geom_swim_label( data = end_study_events, aes(x = time_from_initial_infusion, label_vals = end_study_label, label_names = end_study_name, color = NULL), label.size = NA, fill = NA, size = 5 ) + * scale_color_brewer(name = "Markers", palette = "Set2") ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_12_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + theme_ggswim() + geom_swim_lane(aes( xend = end_time, color = disease_assessment) ) + scale_color_brewer( name = "Overall Disease Assessment", palette = "Set1" ) + new_scale_color() + geom_swim_point( data = infusion_events, aes(x = time_from_initial_infusion, color = infusion_type), size = 5 ) + geom_swim_label( data = end_study_events, aes(x = time_from_initial_infusion, label_vals = end_study_label, label_names = end_study_name, color = NULL), label.size = NA, fill = NA, size = 5 ) + scale_color_brewer(name = "Markers", palette = "Set2") + * labs(title = "My Swimmer Plot") ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_13_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + theme_ggswim() + geom_swim_lane(aes( xend = end_time, color = disease_assessment) ) + scale_color_brewer( name = "Overall Disease Assessment", palette = "Set1" ) + new_scale_color() + geom_swim_point( data = infusion_events, aes(x = time_from_initial_infusion, color = infusion_type), size = 5 ) + geom_swim_label( data = end_study_events, aes(x = time_from_initial_infusion, label_vals = end_study_label, label_names = end_study_name, color = NULL), label.size = NA, fill = NA, size = 5 ) + scale_color_brewer(name = "Markers", palette = "Set2") + labs(title = "My Swimmer Plot") + * labs(x = "Time Since Infusion (Months)") ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_14_output-1.png)<!-- --> ] --- count: false .panel1-the_chunk-auto[ ``` r library(ggswim) library(ggplot2) patient_data |> ggplot() + aes(x = start_time, y = pt_id) + theme_ggswim() + geom_swim_lane(aes( xend = end_time, color = disease_assessment) ) + scale_color_brewer( name = "Overall Disease Assessment", palette = "Set1" ) + new_scale_color() + geom_swim_point( data = infusion_events, aes(x = time_from_initial_infusion, color = infusion_type), size = 5 ) + geom_swim_label( data = end_study_events, aes(x = time_from_initial_infusion, label_vals = end_study_label, label_names = end_study_name, color = NULL), label.size = NA, fill = NA, size = 5 ) + scale_color_brewer(name = "Markers", palette = "Set2") + labs(title = "My Swimmer Plot") + labs(x = "Time Since Infusion (Months)") + * labs(y = "Patient ID") ``` ] .panel2-the_chunk-auto[ ![](swim_embed_files/figure-html/the_chunk_auto_15_output-1.png)<!-- --> ] <style> .panel1-the_chunk-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-the_chunk-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-the_chunk-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> <style type="text/css"> .remark-code{line-height: 1.5; font-size: 70%} @media print { .has-continuation { display: block; } } code.r.hljs.remark-code{ position: relative; overflow-x: hidden; } code.r.hljs.remark-code:hover{ overflow-x:visible; width: 500px; border-style: solid; } </style>