fac.divide {dae} | R Documentation |
Takes a factor and divides it into several individual factors as if the levels in the combined factor correspond to the numbering of the levels combinations of the individual factors when these are arranged in standard or Yates order.
fac.divide(combined.factor, factor.names, order="standard")
combined.factor |
A factor that is to be divided into the individual factors listed in factor.names. |
factor.names |
A list of factors to be formed. The names in the list are the names of the factors and the component of a name is either a) a single numeric value that is the number of levels, b) a numeric vector that contains the levels of the factor, or c) a character vector that contains the labels of the levels of the factor. |
order |
The order in which the levels combinations of the factors in factor.names are to be considered as numbered; standard numbers them as if they are arranged in standard order, that is with the first factor moving slowest and the last factor moving fastest; yates numbers them as if they are arranged in Yates order, that is with the first factor moving fastest and last factor moving slowest. |
A data frame whose columns consist of the factors listed in
factor.names
and whose values have been computed from the combined
factor. All the factors will be of the same length.
A single factor name may be supplied in the list in which case a data frame is produced that contains the single factor computed from the numeric vector. This may be particularly useful when calling this function from others.
b <- 4 t <- 4 RCBDPen.Design <- fac.divide(Random.Order, factor.names = list(Blocks = b, Plots = t))