designfactors-class {planor} | R Documentation

## Class designfactors

### Description

An S4 class to represent the design factors and store their characteristics.

### Objects from the Class

Objects from this class can be created explicitly by calls to `planor.factors` or implicitly by functions such as `planor.designkey`.

### Slots

fact.info

  a dataframe with one row per factor and with columns progressively storing information on the factors, in particular their numbers of levels (`nlev`).

pseudo.info

  a dataframe with one row per pseudofactor and with columns progressively storing information on the pseudofactors.

levels

  a list of numeric or character vectors, with each vector containing the levels of one factor.

### Methods

[

  extract a subset of factors and update all the slots.

bind

  bind two objects. See `bind` method.

length

  return the number of factors.

names

  return the names of the factors.

### Details

Depending on the context and on the construction stage, `fact.info` may contain logical columns that identify the block factors (`block`), the ordered factors (`ordered`), the basic factors (`basic`) and so on. It may also include columns that store the information on the hierarchy relationships between factors, if any.

In package planor, factors are systematically decomposed into pseudofactors which all have a prime number of levels and which play a key role in the design generation. The information on the pseudofactors is stored in the `pseudo.info` slot. In addition to the columns of `fact.info`, it contains a column (called `parent`) to give the factor that each pseudofactor decomposes.

### Author(s)

Monod, H. and Bouvier, A.

### See Also

Creator function: `planor.factors`

### Examples

    F1 <- planor.factors(factors=c("block",LETTERS[1:4]), nlevels=c(6,6,4,2,6))
    F2 <- planor.factors(factors=c("block",LETTERS[11:12]), nlevels=c(4,6,6))
    ### Method bind - a warning will be issued because two factors
    ### in F1 and F2 have the same name
    F3 <- bind(F1,F2)
    names(F3)
    length(F3)
    F3@levels
    F3.trt <- F3[c(2:5,7,8)]
    names(F3.trt)

[Package planor version 1.5-1 Index]