build_grid {consort}R Documentation

Build consort diagram

Description

Build a grob consort diagram, use this if you want to save plots with ggsave. build_grid does not support multiple split for the moment, please use build_grviz or plot(g, grViz = TRUE) for multiple split nodes instead.

Usage

build_grid(x)

Arguments

x

A conosrt object.

Value

A gList object

See Also

gList

Examples

## Not run: 
txt1 <- "Population (n=300)"
txt1_side <- "Excluded (n=15): \n
              \u2022 MRI not collected (n=3)\n
              \u2022 Tissues not collected (n=4)\n
              \u2022 Other (n=8)"

g <- add_box(txt = txt1)

g <- add_side_box(g, txt = txt1_side)

g <- add_box(g, txt = "Randomized (n=200)")
# g <- ggsave("consort_diagram.pdf", plot = build_grid(g))

## End(Not run)


[Package consort version 1.2.1 Index]