data.frame in long format.Calculates one or more of water use (WU), water use rate (WUR), and,
for a set of responses, water use indices (WUI)s over a specified time
interval for each individual in a data.frame in long format.
byIndv4Intvl_WaterUse(data, water.use = "Water.Use", responses = NULL,
individuals = "Snapshot.ID.Tag", times = "DAP",
trait.types = c("WU", "WUR", "WUI"),
suffix.rate = "R", suffix.index = "I",
sep.water.traits = "", sep.responses = ".",
start.time, end.time,
suffix.interval = NULL, sep.suffix.interval = ".",
na.rm = FALSE)A data.frame containing the individuals column, WU
and/or WUR and, if requested, a WUI for each
element of responses. The names of WU and WUR will have
suffix.interval appended, if it is not NULL, separated by a
full stop (`.'). The name of each WUI will be the concatenation of an
element of responses with WUI and, if not NULL,
suffix.interval, the three components being separated by a
full stop (`.').
A data.frame containing the column from which the
water use traits are to be calculated.
A character giving the names of the column in
data that contains the water use values.
A character giving the names of the columns in
data for which WUIs are to be calculated.
A character giving the name of the
factor that defines the subsets of the data
for which each subset corresponds to the response values for
an individual (e.g. plant, pot, cart, plot or unit).
A character giving the name of the column in
data containing the times at which the data was
collected, either as a numeric, factor, or
character. It will be used identifying the intervals and,
if a factor or character, the values should
be numerics stored as characters.
A character listing the trait types to compute
and return. It should be some combination of WU, WUR
and WUI, or be all. See Details for how each
is calculated.
A character giving the label to be appended
to the value of water.use to form the name of the WUR.
A character giving the label to be appended
to the value of water.use to form the name of the WUI.
A character giving the character(s) to be
used to separate the suffix.rate and suffix.index values
from the responses values in constructing the name for a new
rate/index. The default of "" results in no separator.
A character giving the character(s) to be used
to separate the suffix.rate value from aresponses
value in constructing the name for a new index. For no separator,
set to "".
A numeric giving the times,
in terms of values in times, that will give a
single value for each Snapshot.ID.Tag and that will
be taken as the observation at the start of the interval for
which the WUI is to be calculated.
A numeric giving the times,
in terms of values times, that will give a
single value for each Snapshot.ID.Tag and that will be
taken as the observation at the end of the interval for which
the WUI is to be calculated.
A character giving the suffix to be
appended to the names of the columns for the water use traits to
indicate the interval for which the traits have been calculated .
A character giving the separator to use in
appending suffix.inteval to a growth rate. For no separator, set to
"".
A logical indicating whether NA values
should be stripped before the calculation proceeds.
Chris Brien
WUis the water use and is the sum of the water use after start.time
until end.time. Thus, the water use up to start.time is not included.
WURis the Water Use Rate and is WU divided by the difference
between end.time and start.time.
WUIis the Water Use Index and is calculated as a response difference
between the start.time and the end.time, which s then divided by the WU.
byIndv4Intvl_GRsAvg, byIndv4Intvl_GRsDiff,
splitValueCalculate, getTimesSubset,
GrowthRates
data(exampleData)
WU.WUI_31_35 <- byIndv4Intvl_WaterUse(data = longi.dat,
water.use = "WU", responses = "PSA",
times = "DAP",
trait.types = c("WUR","WUI"),
suffix.rate = ".Rate",
suffix.index = ".Index",
start.time = 31, end.time = 35,
suffix.interval = "31to35")
Run the code above in your browser using DataLab