data.frameUses AGRdiff, PGR and
RGRdiff to calculate growth rates continuously
over time for subsets of the values of response and
stores the results in data. The subsets are those values
with the same levels combinations of the factors listed in
INDICES.
splitContGRdiff(data, responses, INDICES,
which.rates = c("AGR","PGR","RGR"), suffices.rates=NULL,
times.factor = "Days")A data.frame containing the columns for which
growth rates are to be calculated.
A character giving the names of the columns in
data for which growth rates are to be calculated.
A character giving the growth rates that are
to be calculated. It should be a combination
"AGR", "PGR" and "RGR".
A character giving the name of the column in
data containing the factor for times at which the data was
collected. Its levels will be used in calculating growth rates and
should be numeric values stored as characters.
A character giving the characters to be
appended to the names of the responses to provide the
names of the columns containing the calculated growth rates.
The order of the suffices in suffices.rates should
correspond to the order of the elements of
which.rates. If NULL, the values of
which.rates are used.
A data.frame containing data to which has been
added a column for the differences between the times.factor,
if it is not already in data, and
columns with growth rates. The name of the column for times.factor
differences will be the times.factor with ".diff" appended and,
for each of the growth-rate columns will
be the value of response with one of ".AGR", ".PGR"
or "RGR" or the corresponding value from suffices.GR
appended.
# NOT RUN {
data(exampleData)
longi.dat <- splitContGRdiff(longi.dat, response="Area.smooth",
INDICES = "Snapshot.ID.Tag", which.rates=c("AGR", "RGR"))
# }
Run the code above in your browser using DataLab