plotAnom | R Documentation |
Uses byIndv4Intvl_ValueCalc
and the function
anom
to identify anomalous individuals in longitudinal
data. The user can elect to print the anomalous individuals, a
profile plot without the anomalous individuals and/or a profile plot
with only the anomalous individuals. The plots are produced using
ggplot
. The plot can be facettd so that a grid of plots is
produced.
plotAnom(data, response="sPSA",
individuals="Snapshot.ID.Tag",
times = "DAP", x = NULL,
breaks.spacing.x = -2, angle.x = 0,
vertical.line=NULL,
groupsFactor=NULL, lower=NULL, upper=NULL,
start.time=NULL, end.time=NULL,
suffix.interval=NULL,
columns.retained=c("Snapshot.ID.Tag", "Smarthouse", "Lane",
"Position", "Treatment.1", "Genotype.ID"),
whichPrint=c("anomalous","innerPlot","outerPlot"), na.rm=TRUE, ...)
data |
A |
response |
A |
individuals |
A |
times |
A |
x |
A |
breaks.spacing.x |
A |
angle.x |
A |
vertical.line |
A |
groupsFactor |
A |
lower |
A |
upper |
A |
start.time |
A |
end.time |
A |
suffix.interval |
A |
columns.retained |
A |
whichPrint |
A |
na.rm |
A |
... |
allows for arguments to be passed to |
A list
with three components:
data
, a data frame resulting from the merge
of data
and the logical
identifying whether
or not an individual is anomalous;
innerPlot
, an object of class ggplot
storing the
profile plot of the individuals that are not anomalous;
outerPlot
, an object of class ggplot
storing the
profile 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.
Chris Brien
anom
, byIndv4Intvl_ValueCalc
, ggplot2
.
data(exampleData)
anomalous <- plotAnom(longi.dat, response="sPSA.AGR",
times = "xDAP",
lower=2.5, start.time=40,
vertical.line=29,
breaks.spacing.x = 2,
whichPrint=c("innerPlot"),
y.title="sPSA AGR")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.