intervalGRdiff {imageData} | R Documentation |
Calculates the growth rates for a specified time interval
Description
Using the values of the responses, calculates the specified combination of the Absolute Growth Rates using differences (AGR), the Proportionate Growth Rates (PGR) and Relative Growth Rates using log differences (RGR) between two nominated time points.
Usage
intervalGRdiff(responses, individuals = "Snapshot.ID.Tag",
which.rates = c("AGR","PGR","RGR"), suffices.rates=NULL,
times.factor = "Days", start.times, end.times, suffix.interval,
data)
Arguments
responses |
A |
individuals |
A |
which.rates |
A |
suffices.rates |
A |
times.factor |
A |
start.times |
A |
end.times |
A |
suffix.interval |
A |
data |
A |
Details
The AGR
is calculated as the difference between the values of
response
at the end.times
and start.times
divided by the
difference between end.times
and start.times
.
The PGR is calculated as the ratio of response
at the end.times
to that at start.times
and the ratio raised to the power of the
reciprocal of the difference between end.times
and start.times
.
The RGR
is calculated as the log
of the PGR and so is equal to
the difference between the logarithms of response
at the end.times
and start.times
divided by the difference
between end.times
and start.times
.
Value
A data.frame
with the growth rates.
The name of each column is the concatenation of (i) one of
responses
, (ii) one of AGR
, PGR
or RGR
,
or the appropriate element of suffices.rates
, and (iii)
suffix.interval
, the three components being separated by
full stops.
Author(s)
Chris Brien
See Also
intervalGRaverage
, intervalWUI
, getDates
, GrowthRates
, splitSplines
, splitContGRdiff
Examples
data(exampleData)
Area.smooth.GR <- intervalGRdiff("Area.smooth", which.rates = c("AGR","RGR"),
start.times = 31, end.times = 35,
suffix.interval = "31to35",
data = longi.dat)