Description Usage Arguments Value Examples
Generate a flexible longitudinal/spaghetti plot for endpoint analysis with options to facet and add marker lines
1 2 3 4 |
data |
a dataframe containing the input data to plot (dataframe) |
x |
column name for x-axis parameter (string) |
y |
column name for y-axis parameter (string) |
group_by |
a column name containing a subgrouping factor to split the plot by (string) |
facet |
optional parameter, column name containing a subgrouping factor to facet the plot by (string) |
stat |
optional parameter, type of summary statistic to compute on y-variable, choose "mean" or "median" if y is not already summary-level data (string) |
aggr |
column name used to compute aggregate counts (n = ) in legend, default is "USUBJID" (string) |
show_n |
boolean parameter for displaying counts from aggr, default is TRUE (logical) |
log_y |
optional parameter, boolean for whether to use a log scale for y-axis, default is FALSE (logical) |
title |
optional parameter, custom plot title (string) |
xlab |
optional parameter, custom x-axis plot label (string) |
ylab |
optional parameter, custom y-axis plot label (string) |
symb |
optional parameter to shape markers by a factor type column (string) |
markers |
optional parameter, list of special interest x-axis values to display vertical dashed marker lines (numeric list/series) |
caption |
optional string to include as a caption on bottom of plot (string) |
size |
optional string to specify font size schema ("small" for PDF usage or "large" for Shiny apps) to use for plot, default is "small" (string) |
max_lvl |
optional parameter, maximum levels group_by can have before legend is hidden (integer) |
produces a line plot with study endpoint measurements over time
1 2 3 4 5 6 | lineplot(data = AZA, x = "ADY", y = "AVAL", group_by = "USUBJID", facet = "CHRTGRP",
symb = "EPOCH", markers = c(45, 85), ylab = "Ulcer Area")
lineplot(data = AZA, x = "ADY", y = "PDCR", group_by = "USUBJID", facet = "CHRTGRP", log_y = TRUE,
symb = "EPOCH", ylab = "Percent Decrease in Ulcer Area")
lineplot(data = AZA, x = "ADY", y = "PDCR", group_by = "CHRT",
stat = "mean", ylab = "Mean % Decrease in Area", size = "large")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.