| byIndv4Times_periodicRates | R Documentation |
times and rates values to a
data.frame to make a set of periodic, or equally spaced, rates.
Adds the times and rates values to a data.frame to produce
a set of periodic rates i.e. rates for equally spaced times, the
difference between consecutive times being equal to
reqd.times.diff. This assumes that the values for the consecutive
differences between the values in the times column in data
are an integer multiple of the value of reqd.times.diff and
involves inserting times when the integer multiple of a times value is
greater than one. It is also assumed that it is appropriate to use the
rate value for the time immediately following inserted time(s) for the
rate value(s) for the inserted times. Additional columns can be
specified to have values duplicated for the inserted times.
If avail.time.diffs is FALSE, the differences between
consecutive time values in data are calculated.
byIndv4Times_periodicRates(data, responses,
individuals = "Snapshot.ID.Tag",
times = "DAP",
columns2duplicate = NULL,
reqd.times.diff = 1,
avail.times.diffs = FALSE)
data |
A |
responses |
A |
individuals |
A |
times |
A |
columns2duplicate |
A |
reqd.times.diff |
A single-valued |
avail.times.diffs |
A |
A data.frame obtained by expanding data to include all
combinations of the values of individuals and the set of equally
spaced times between the minimum and maximun values of times,
the spacing being the value of reqd.times.diff.
For the rate(s) specified in the argument responses, values of the
rate for the times immediately above an inserted times value
are assigned to the values of the responses for the inserted
times.
Chris Brien
byIndv4Times_WaterUse
data(exampleData)
longi.dat <- within(longi.dat, WUR <- WU/DAP.diffs)
longi.dat <- byIndv4Times_periodicRates(data = longi.dat,
responses = "WUR",
individuals = "Snapshot.ID.Tag",
times = "DAP",
avail.times.diffs = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.