byIndv4Times_GRsDiff | R Documentation |
data.frame
, the growth rates calculated for consecutive times
for individuals in a data.frame
in long format by differencing
response values.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 factor
s listed in
individuals
.
If avail.time.diffs
is FALSE
, the differences between
consecutive time values are calculated. For this, it is assumed that
the same first times
value is present in data
for all
individuals
.
byIndv4Times_GRsDiff(data, responses,
individuals = "Snapshot.ID.Tag", times = "DAP",
which.rates = c("AGR","PGR","RGR"),
suffices.rates=NULL, sep.rates = ".",
avail.times.diffs = FALSE, ntimes2span = 2)
data |
A |
responses |
A |
individuals |
A |
times |
A |
which.rates |
A |
suffices.rates |
A |
sep.rates |
A |
avail.times.diffs |
A |
ntimes2span |
A |
A data.frame
containing data
to which has been
added i) 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 value
of 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.
Chris Brien
smoothSpline
, byIndv4Times_SplinesGRs
data(exampleData)
longi.dat <- byIndv4Times_GRsDiff(data = longi.dat,
response = "sPSA",
individuals = "Snapshot.ID.Tag",
times = "DAP",
which.rates=c("AGR", "RGR"),
avail.times.diffs = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.