| splitContGRdiff {growthPheno} | R Documentation |
Adds, to a data.frame, the growth rates for individuals calculated
continuously over time by differencing response values.
Description
Uses AGRdiff, PGR and
RGRdiff to calculate growth rates continuously
over time for the response by differencing pairs of pairs
of response values and
stores the results in data. The subsets are those values
with the same levels combinations of the factors listed in
individuals.
Note: this function is soft deprecated and may be removed in
future versions.
Use byIndv4Times_GRsDiff.
Usage
splitContGRdiff(data, responses,
individuals = "Snapshot.ID.Tag", INDICES = NULL,
which.rates = c("AGR","PGR","RGR"), suffices.rates=NULL,
times.factor = "Days", avail.times.diffs = FALSE,
ntimes2span = 2)
Arguments
data |
A |
responses |
A |
individuals |
A |
INDICES |
A pseudonym for |
which.rates |
A |
times.factor |
A |
avail.times.diffs |
A |
ntimes2span |
A |
suffices.rates |
A |
Value
A data.frame containing data to which has been
added 9i) a column for the differences between the times,
if it is not already in data, and (ii) columns with growth rates.
The name of the column for times differences will be the
times with ".diffs" appended. The name for each of the
growth-rate columns will be either the value of response with
one of ".AGR", ".PGR" or "RGR", or the
corresponding value from suffices.rates appended. Each growth
rate will be positioned at observation
ceiling(ntimes2span + 1) / 2 relative to the two times from
which the growth rate is calculated.
Author(s)
Chris Brien
See Also
Examples
data(exampleData)
longi.dat <- splitContGRdiff(data = longi.dat,
response="sPSA", times.factor = "DAP",
individuals = "Snapshot.ID.Tag",
which.rates=c("AGR", "RGR"),
avail.times.diffs = TRUE)