edc_swimmerplot {EDCimport} | R Documentation |
Swimmer plot of all dates columns
Description
Join all tables from .lookup$dataset
on id
Usage
edc_swimmerplot(
.lookup = getOption("edc_lookup"),
...,
id = get_key_cols()$patient_id,
group = NULL,
origin = NULL,
id_lim = NULL,
exclude = NULL,
time_unit = c("days", "weeks", "months", "years"),
aes_color = c("variable", "label"),
plotly = getOption("edc_plotly", FALSE)
)
Arguments
.lookup |
the lookup table, default to |
... |
not used |
id |
the patient identifier. Will be coerced as numeric. |
group |
a grouping variable, given as "dataset$column" |
origin |
a variable to consider as time 0, given as "dataset$column" |
id_lim |
a numeric vector of length 2 providing the minimum and maximum |
exclude |
a character vector of variables to exclude, in the form |
time_unit |
if |
aes_color |
either |
plotly |
whether to use |
Value
either a plotly
or a ggplot
Examples
#tm = read_trialmaster("filename.zip", pw="xx")
tm = edc_example_plot()
load_list(tm)
p = edc_swimmerplot(.lookup, id_lim=c(5,45))
p2 = edc_swimmerplot(.lookup, origin="db0$date_naissance", time_unit="weeks",
exclude=c("DB1$DATE2", "db3$.*"))
p3 = edc_swimmerplot(.lookup, group="db0$group", aes_color="label")
## Not run:
#save the plotly plot as HTML to share it
htmlwidgets::saveWidget(p, "edc_swimmerplot.html", selfcontained=TRUE)
## End(Not run)
[Package EDCimport version 0.4.1 Index]