Learn R Programming

DoE.base (version 0.2)

Class design and accessors: Class design and its accessor functions

Description

Convenience functions to quickly access attributes of data frames of the class design that have been generated by functions FrF2, pb or fac.design

Usage

desnum(design)
run.order(design)
design.info(design)
design
## S3 method for class 'design':
[(x, i, j, drop.attr = TRUE, drop = FALSE)
ord(matrix, decreasing=FALSE)

Arguments

design
data frame of class design as generated by FrF2, pb, fac.design, or the above extractor function for class design. The structures of the respective design objects are described in the va
x
data frame of class design as generated by FrF2, pb, or fac.design
i
indices for subsetting rows
j
indices for subsetting columns
drop.attr
logical, controls whether or not attributes are dropped; if TRUE, the result is no longer of class design, and all special design attributes are dropped; otherwise, the design attributes are adjusted to reflect the subsetting
drop
logical that controls dropping of dimensions in the Extract function for data.frame objects, which is called by the method for class design
matrix
matrix, data frame or also object of class design that is to be ordered column by column
decreasing
logical, indicates whether decreasing order or not (increasing is default)

Value

  • desnumreturns a numeric matrix,
  • run.orderreturns a 3-column data frame with standard and actual run order as well as a run order with replication identifiers attached,
  • design.inforeturns a list with first element type, further info on the design, and some options of the design call regarding randomization and replication
  • The extractor function returns a class design object with modified attributes or a data frame without special attributes, depending on the situation. If j is given, the function always returns a data frame without special attributes, even if drop.attr=FALSE or j=1:ncol(design). If only i is given, the default option drop.attr=TRUE also returns a data frame without attributes. Exception: Even for drop.attr=TRUE, if i is a permutation of the row numbers or a logical vector with all elements TRUE, the attributes are preserved, and attributes run.order and desnum are reordered along with the design, if necessary. If drop.attr=FALSE and j is empty, the function returns an object of class design with rows of attributes run.order and desnum selected in line with those of the design itself. In this case, the new design.info attribute is a list with entries
    • type
    {resolving to subset of design, } subset.rows{ a numeric or logical vector with the selected rows, and} orig.design.info{ which contains the original design.info attribute.}

item

ord

code

design[ord(design),]

Details

Items of class design are data frames with attributes. The functions desnum, run.order and design.info extract the respective attribute, i.e. e.g. function design.info extracts the design information for the design, which depends on the way the design was obtained. Detailed information on the structure of design.info can be found in the value sections of the respective functions. The extractor method subsets the design, taking care of the attributes accordingly. Note that the information attached to objects of class design is currently only available for usage by the user, but is not (yet) used by the analysis facilities in the package!

See Also

~~See Also FrF2, pb, fac.design