probeSmoothing | R Documentation |
Takes a response
and, for each individual
, uses
splitSplines
to smooth its values for each individual
using 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
smoothing methods
in combination with df
. Note that the
arguments that modify the plots apply to all
plots that are produced. The handling of missing values is controlled
via na.x.action
and na.y.action
Note: this function is soft deprecated and may be removed in
future versions.
Use probeSmooths
.
probeSmoothing(data, response = "Area", response.smoothed = NULL,
x = NULL, xname="xDays",
times.factor = "Days", individuals="Snapshot.ID.Tag",
na.x.action="exclude", na.y.action = "exclude",
df, smoothing.methods = "direct", correctBoundaries = FALSE,
get.rates = TRUE, rates.method="differences",
facet.x = "Treatment.1", facet.y = "Smarthouse",
labeller = NULL, x.title = NULL,
colour = "black", colour.column=NULL,
colour.values=NULL, alpha = 0.1,
trait.types = c("response", "AGR", "RGR"),
propn.types = c(0.1, 0.5, 0.75), propn.note = TRUE,
which.plots = "smoothedonly",
deviations.plots = "none", alpha.med.devn = 0.5,
ggplotFuncs = NULL, ggplotFuncsMedDevn = NULL,
...)
data |
A |
response |
A |
response.smoothed |
A |
x |
A |
xname |
A |
times.factor |
A |
individuals |
A |
na.x.action |
A |
na.y.action |
A |
df |
A |
smoothing.methods |
A |
correctBoundaries |
A |
get.rates |
A |
rates.method |
A |
facet.x |
A |
facet.y |
A |
labeller |
A |
x.title |
Title for the x-axis. If |
colour |
A |
colour.column |
A |
colour.values |
A |
alpha |
A |
trait.types |
A |
propn.types |
A |
propn.note |
A |
which.plots |
A |
deviations.plots |
A |
alpha.med.devn |
A |
ggplotFuncs |
A |
ggplotFuncsMedDevn |
A |
... |
allows passing of arguments to |
A 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"
.
Chris Brien
splitSplines
, splitContGRdiff
, smooth.spline
, ggplot
.
data(exampleData)
vline <- list(ggplot2::geom_vline(xintercept=29, linetype="longdash", size=1),
ggplot2::scale_x_continuous(breaks=seq(28, 42, by=2)))
probeSmoothing(data = longi.dat, response = "PSA", df = c(4,7),
xname = "xDAP", times = "DAP",
ggplotFuncs=vline)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.