| extab {dae} | R Documentation |
Expands the values in table to a vector
Description
Expands the values in table to a vector
according to the index.factors that are considered to index
the table, either in standard or Yates order. The order
of the values in the vector is determined by the order of
the values of the index.factors.
Usage
extab(table, index.factors, order="standard")
Arguments
table |
A numeric |
index.factors |
A list of |
order |
The order in which the levels combinations of the |
Value
A vector of length equal to the factors in
index.factor whose values are taken from table.
Author(s)
Chris Brien
Examples
## generate a small completely randomized design with the two-level
## factors A and B
n <- 12
CRD.unit <- list(Unit = n)
CRD.treat <- fac.gen(list(A = 2, B = 2), each = 3)
CRD.lay <- designRandomize(allocated = CRD.treat, recipient = CRD.unit,
seed = 956)
## set up a 2 x 2 table of A x B effects
AB.tab <- c(12, -12, -12, 12)
## add a unit-length vector of expanded effects to CRD.lay
attach(CRD.lay)
CRD.lay$AB.effects <- extab(table=AB.tab, index.factors=list(A, B))