data frame. It must contain a column whose name is the value
of wellcol, and further columns that are needed by the function
named by stat.
wellcol
character of length 1. Name of a column in x that
contains the well ID.
wellrange
vector of the same type as x[, wellcol]. All
values x[, wellcol] must be contained in wellrange.
statfun
character of length 1. Name of a function that can calculate
a statistic from selected rows of x.
platename
character of length 1. The name or ID of this plate, which
will be used for graphics output filenames and as the value of the column
platename of the return value.
plotdir
character of length 1. The name of directory where
diagnostic plots will be saved.
...
further arguments that are passed on to statfun.
Details
The semantics of this function are similar to
tapply, but some additional checking and
reporting is performed, and the return value is a data frame.
Value
A data frame with number of rows equal to
length(wellrange). Rows (wells) for which there is no data
contains NAs. The columns comprise platename,
well-ID (from x[, wellcol]), and the
results from statfun.