| anomPlot {imageData} | R Documentation |
Identifies anomalous individuals and produces longitudinal plots without them and with just them
Description
Uses intervalValueCalculate and the function
anom to identify anomalous individuals. The user can
elect to print the anomalous individuals, a longitudinal profile plot
without the anomalous individuals and/or a longitudinal profile plot
with only the anomalous individuals. The plots are produced using
ggplot. The plot can be facetted so that a grid of plots is
produced.
Usage
anomPlot(data, x="xDays+24.16666667", response="Area.smooth.RGR",
individuals="Snapshot.ID.Tag",
breaks=seq(12, 36, by=2), vertical.line=NULL,
groupsFactor=NULL, lower=NULL, upper=NULL,
start.time=NULL, end.time=NULL, times.factor = "Days",
suffix.interval=NULL,
columns.retained=c("Snapshot.ID.Tag", "Smarthouse", "Lane",
"Position", "Treatment.1", "Genotype.ID"),
whichPrint=c("anomalous","innerPlot","outerPlot"), na.rm=TRUE, ...)
Arguments
data |
A |
x |
A |
response |
A |
individuals |
A |
breaks |
A |
vertical.line |
A |
groupsFactor |
A |
lower |
A |
upper |
A |
start.time |
A |
end.time |
A |
times.factor |
A |
suffix.interval |
A |
columns.retained |
A |
whichPrint |
A |
na.rm |
A |
... |
allows for arguments to be passed to |
Value
A list with three components:
-
data, a data frame resulting from themergeofdataand thelogicalidentifying whether or not an individual is anomalous; -
innerPlot, an object of classggplotstoring the longitudinal plot of the individuals that are not anomalous; -
outerPlot, an object of classggplotstoring the longitudinal plot of only the individuals that are anomalous.
The name of the column indicating anomalous individuals will be result of
concatenating the response, anom and, if it is not
NULL, suffix.interval, each separated by a full stop.
The ggplot objects can be plotted using print and can be
modified by adding ggplot functions before printing. If there are
no observations to plot, NULL will be returned for the plot.
Author(s)
Chris Brien
See Also
anom, intervalValueCalculate, ggplot.
Examples
data(exampleData)
anomalous <- anomPlot(longi.dat, response="Area.smooth.AGR",
lower=2.5, start.time=40,
x = "xDays+35.42857143", vertical.line=29,
breaks=seq(28, 42, by=2),
whichPrint=c("innerPlot"),
y.title="Area.smooth.AGR")