Learn R Programming

prada (version 1.48.0)

analysePlate: Apply a statistic to the data from each well in a plate

Description

Apply a statistic to the data from each well in a plate

Usage

analysePlate(x, wellcol="well", wellrange, statfun, platename, plotdir=".", ...)

Arguments

x
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.

Value

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.

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.