View source: R/plot_cumu_set.R
plot_cumu_set | R Documentation |
x-axis is date; y-axis is the average of the 36 pin heights' difference from baseline (first measurement). One facet per SET id.
plot_cumu_set(data, columns = 4, pointsize = 3.5, scales = "fixed",
smooth = TRUE, lty_smooth = 5)
data |
data frame (e.g. '$set' piece of output from 'calc_change_cumu()') with one row per faceting variable, and the following columns, named exactly: date, set_id, mean_cumu. 'mean_cumu' should be an already-calculated field of change since baseline. |
columns |
number of columns you want in the faceted output |
pointsize |
size of points you want (goes into the 'size' argument of 'ggplot2::geom_point') |
scales |
passed to 'facet_wrap'; same fixed/free options as that function |
smooth |
do you want a linear regression plotted on top? |
lty_smooth |
type of line (1 = solid; 2 and 5 = dashed; normal line types) |
a ggplot object
cumu_set <- calc_change_cumu(example_sets)
plot_cumu_set(cumu_set$set)
plot_cumu_set(cumu_set$set, columns = 1, pointsize = 2, smooth = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.