assayTable2frame: Expand table to matrix of measurements by variables - for...

Description Usage Arguments Details Value Note Author(s) Examples

Description

A table, that is, a 2-dimensional array, with the responses of an experiment is transformed for into a matrix, a data.frame, with rows for the individual measurements and columns the variables and factors of the assay - for pla.fit and pla.plots.

Usage

1
2
3
4
5
6
assayTable2frame(table,
                 dr = 2,
                 Z = log((1/dr)^(max(Dilution) - Dilution)),
                 byOrder = TRUE,
                 echoData = TRUE,
                 ...)

Arguments

table

A table in an object of class array. This is here usually in this tool the result of as.array on the result of readAssayTable.

dr

The dilution ratio of the geometric dilution serie with equally spaced dilutions (constant ratio between any adjacent dilutions) on the logarithmic scale. See also data2assayFrame.

Z

The 'concentration', by default computed as log((1/dr)^{(max(Dilution) - Dilution)}), where Dilution is dilution step. See also data2assayFrame.

byOrder

If TRUE then the order of the columns defines the order and values of the dilution steps - for tables read by readAssayTable with the single repetition over several lines. If FALSE then the 'dose' is extracted from the dimnames of the table and as well Dilution and Z is given this value.

echoData

If TRUE then the data is shown with means, standard deviations and coefficients of variations of columns.

...

For additional arguments.

Details

This function is used on table of data read by readAssayTable. The table of responses is transformed into a data.frame with the relevant columns Response, Dilution, Sample, and Replicate. The rows of the input table are replicates, and the columns of the input table are the cross classification samples and dilutions.

Value

A data.frame with rows of individual observations and columns of treatments, dilution step numbers, replicate numbers (blocks), response-values, etc.

Note

If, e.g., "1. form" of table layout is used for the input file, see readAssayTable:

Dilution steps (and concentrations) are determined by the order of the columns in table, not the column-names of the table (by default) - for tables read with the single repetition over several lines. Thus the value of the dose in the label of the columns of the table is ignored - if not the argument byOrder is set to FALSE.

Sample names (and "doses") are extracted from the second item of dimnames of the table. If this second component of the dimnames of the table does not contain text strings with the character ":", then the sample name is the first character of each name. If the names contains the character ":", the sample name is the first item, when splitting according to ":".

If byOrder is set to TRUE (default) then Dilution step is the index of the column of the dilutionstep among the columns for the sample in the table.

If byOrder is set to FALSE then "dose" is the last item (when splitting according to ":") of each name of the header dimnames of the table.

- Similar, if the doses and/or samples are given in rows.

The first meet sample in the sample column is the reference (by default) in pla.fit and pla.plots.

Author(s)

Jens Henrik Badsberg

Examples

1
2
3
4
5
6
data(HepatitisB); Data <- HepatitisB

Data <- readAssayTable(paste(system.file(package = "pla"),
                             "vignettes/PhEur/data/HepatitisB.txt",
                             sep = "/"), fun = log)
Frame  <- assayTable2frame(as.array(Data))

pla documentation built on May 2, 2019, 11:12 a.m.