Description Usage Arguments Value Author(s) See Also Examples
Produce profile or longitudinal plots of a response using ggplot
.
A line is drawn for the data for each individual
and the plot
can be facetted so that a grid of plots is produced. For each facet a line for
the medians over time can be added, along with the vaue of the outer whiskers
(median +/- 1.5 * IQR).
1 2 3 4 5 6 7 8 9 | plotLongitudinal(data, x = "xDays+44.5", response = "Area",
individuals = "Snapshot.ID.Tag", title = NULL,
x.title = "Days", y.title = "Area (kpixels)",
facet.x = "Treatment.1", facet.y = "Smarthouse",
labeller = NULL, colour = "black",
colour.column = NULL, colour.values = NULL,
alpha = 0.1, addMediansWhiskers = FALSE,
xname = "xDays", ggplotFuncs = NULL,
printPlot = TRUE)
|
data |
A |
x |
A |
response |
A |
individuals |
A |
x.title |
Title for the x-axis. |
y.title |
Title for the y-axis. |
title |
Title for the plot. |
facet.x |
A |
facet.y |
A |
labeller |
A |
colour |
A |
colour.column |
A |
colour.values |
A |
alpha |
A |
addMediansWhiskers |
A |
xname |
A |
ggplotFuncs |
A |
printPlot |
A |
An object of class "ggplot
", which can be plotted using
print
.
Chris Brien
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(exampleData)
plotLongitudinal(data = longi.dat, response = "Area.smooth")
plt <- plotLongitudinal(data = longi.dat, response = "Area.smooth", x.title = "DAP",
y.title = "Area.smooth", x="xDays+35.42857143", printPlot=FALSE)
plt <- plt + ggplot2::geom_vline(xintercept=29, linetype="longdash", size=1) +
ggplot2::scale_x_continuous(breaks=seq(28, 42, by=2)) +
ggplot2::scale_y_continuous(limits=c(0,750))
print(plt)
plotLongitudinal(data = longi.dat, response = "Area.smooth", x.title = "DAP",
y.title = "Area.smooth", x="xDays+35.42857143",
ggplotFuncs = list(ggplot2::geom_vline(xintercept=29, linetype="longdash",
size=1),
ggplot2::scale_x_continuous(breaks=seq(28, 42, by=2)),
ggplot2::scale_y_continuous(limits=c(0,750))))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.