response and, for each individual, uses
smooth.spline to smooth its values for each of the degrees
of freedom values in df. Provided get.rates is TRUE,
both the Absolute Growth Rates (AGR) and the Relative Growth Rates (RGR)
are calculated for each smooth, either using differences or first
derivatives. A combination of the unsmoothed and smoothed
values, as well as the AGR and RGR, can be plotted for each value in
df. Note that the arguments that modify the plots apply to all
plots that are produced.probeDF(data, response = "Area", xname="xDays", individuals="Snapshot.ID.Tag", na.rm = FALSE, df, get.rates = TRUE, rates.method="differences", times.factor = "Days", x = NULL, facet.x = "Treatment.1", facet.y = "Smarthouse", which.plots = c("smoothed", "AGR", "RGR"), ggplotFuncs = NULL, ...)data.frame containing the data.character specifying the response variable to be
supplied to smooth.spline and that
is to be plotted on the y-axis.character giving the name of the
numeric that contains the values of the predictor
variable to be supplied to smooth.spline.logical indicating whether or not rows of data
with NAs are to be removed prior to smoothing.numeric specifying the set of degrees of freedom to
be probed.logical specifying whether or not the growth
rates (AGR and RGR) are to be computed and stored.character specifying the method to use in
calculating the growth rates. The two possibilities are
"differences" and "derivates".character giving the name of the column in
data containing the factor for times at which the data was
collected. Its levels will be used in calculating growth rates and
should be numeric values stored as characters.character giving the variable to be plotted on the
x-axis. If x is NULL then xname is used.data.frame giving the variable to be used to
form subsets to be plotted in separate columns of plots.
Use "." if a split into columns is not wanted.data.frame giving the variable to be used to
form subsets to be plotted in separate rows of plots.
Use "." if a split into columns is not wanted.character giving the plots that are to be
produced. If none, no plots are produced. If all,
plots of the unsmoothed response and, for each value of df,
plots of the smoothed response, the AGR and RGR are produced. If
responseComparison, a combined plot of the unsmoothed
response and the smoothed response is produced for for each value
of df.longiPlot.data.frame containing individuals,
times.factor, facet.x, facet.y, xname,
response, and, for each df, the smoothed
response, the AGR and the RGR. It is returned invisibly. The names of
the new data are constructed by joining elements separated by full
stops (.). In all cases, the last element is the value of
df. For the smoothed response, the other elements are
response and "smooth"; for AGR and RGR, the other elements
are the name of the smoothed response and either "AGR" or
"RGR".splitSplines, splitContGRdiff, smooth.spline, ggplot.data(exampleData)
vline <- list(ggplot2::geom_vline(xintercept=20, linetype="longdash", size=1),
ggplot2::scale_x_continuous(breaks=seq(12, 36, by=2)))
probeDF(data = longi.dat, response = "Area", df = c(4,7), x="xDays+24.16666667",
ggplotFuncs=vline)
Run the code above in your browser using DataLab