data.framesmooth.spline to fit a spline to a subset of the values
of response and stores the fitted values in data.
The subsets are those values with the same levels combinations
of the factors listed in INDICES and the degrees of
smoothing is controlled by df. The derivatives
of the fitted spline can also be obtained, as can the Relative
Growth Rates (RGR).splitSplines(data, response, x, INDICES, df = NULL, deriv = NULL, suffices.deriv=NULL, RGR=NULL, na.rm = FALSE, sep=".")data.frame containing the column to be smoothed.character giving the name of the column in
data that is to be smoothed.character giving the name of the column in
data that contains the values of the predictor variable.numeric specifying the desired equivalent number of degrees
of freedom of the smooth (trace of the smoother matrix). Lower values
result in more smoothing. If df = NULL, ordinary leave-one-out
cross-validation is used to determine the amount of smooth.numeric specifying one or more orders of derivatives
that are required.character giving the characters to be
appended to the names of the derivatives.character giving the character to be appended
to the name of the RGR. If RGR is not NULL,
deriv must include 1 so that the the first derivative is
available for caluclating the RGR. If RGR is NULL,
the RGR is not calculated.logical indicating whether or not rows of data
with NAs are to be removed prior to smoothing.data.frame containing data to which has been
added a column with the fitted smooth, the name of the column being
response with .smooth apended to it. If deriv is
not NULL, columns containing the values of the derivative(s)
will be added to data; the name each of these columns will
be the value of response with .smooth.dvf appended,
where f is the order of the derivative, or the value of
response with .smooth. and the corresponding
element of suffices.deriv appended. If RGR is not
NULL, the RGR is calculated as the ratio of value of the first
derivative of the fitted spline and the fitted value for the spline.fitSpline, smooth.spline,
predict.smooth.spline, splitContGRdiff, splitdata(exampleData)
longi.dat <- splitSplines(longi.dat, response="Area", x="xDays",
INDICES = "Snapshot.ID.Tag",
df = 4, deriv=1, suffices.deriv="AGRdv", RGR="RGRdv")
Run the code above in your browser using DataLab