options(htmltools.dir.version = FALSE)
library(xaringan)
library(xaringanthemer)
library(tidyverse)
source('create_status_tables.R')
library(xaringanthemer)
style_duo_accent(
  primary_color = "#292077" ,
  secondary_color = "#8c54fc",
  inverse_header_color = "#FFFFFF"
)

class: header_background

What Are CONSORT diagrams?

To promote transparency

In clinical trials, a CONSORT diagram shows the flow of participants from screening to analysis, while identifying and providing reasons for dropout or exclusion of participants at each step along the way. image


class: header_background

CONSORT diagrams

Endorsed by most medical journals

.pull-left[ CONSORT = Consolidated Standards of Reporting Trials, developed by the CONSORT group, http://www.consort-statement.org, which started in 1993 to improve the quality of reporting of clinical trials. ] .pull-right[ image ]


class: header_background

An Artisanal Product


class: header_background, center

{ggconsort} as an Idea

knitr::include_graphics("images/rpubs_consort.png")

- https://rpubs.com/phiggins/461686

class: header_background

Limitations


class: header_background

{ggconsort} Goal: One Function

draw_consort(status_table)


class: header_background

What is the Underlying Data Structure?


class: header_background

Two Parts to CONSORT - N = 1 and N = n_arms

image


class: header_background

Naming and labeling components

image

class: header_background

Data Model: the Status Table


class: header_background

Example Data - status_tables


class: header_background

Glimpse of a Status Table

glimpse(status2)

class: header_background

Conceptual Model for Drawing CONSORT

image - Then ggplot

ggplot(top_tbl) +
  geom_rect(aes(xmin = xmin, xmax=xmax, ymin=ymin, ymax=ymax)) +
  geom_text(aes(x=xcenter, y = ycenter, label= label)) +
  geom_segment(aes(x=x, xend=xend, y=y, yend=yend))

class: header_background

Conceptual Model

image - Then ggplot

ggplot(bottom_n_tbl) +
  geom_rect(aes(xmin = xmin, xmax=xmax, ymin=ymin, ymax=ymax)) +
  geom_text(aes(x=xcenter, y = ycenter, label= label)) +
  geom_segment(aes(x=x, xend=xend, y=y, yend=yend))

class: header_background

Helper Functions in Place


class: header_background

Problems


class: header_background

Aspiration: Package / Repository

.center[ https://github.com/higgi13425/ggconsort ]

knitr::include_graphics("images/github-ggconsort.png")

class: header_background

The Aspirational Hex Sticker

knitr::include_graphics("images/hex-ggconsort.png")

class: header_background

Help (Collaborators) Needed!

Aspirational Goals


class: inverse, center, middle

Thanks for your Help!



higgi13425/ggconsort documentation built on June 14, 2024, 6:48 p.m.