Class design and accessors {DoE.base} | R Documentation |
Convenience functions to quickly access attributes of data frames of the class design that have been generated by functions FrF2, pb or fac.design
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)
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 value sections of the functions that create them. Generally, all
class design objects are lists with entries desnum , run.order , and design.info .
The differences lie in the details of design.info . |
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 result |
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) |
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!
desnum |
returns a numeric matrix, |
run.order |
returns a 3-column data frame with standard and actual run order as well as a run order with replication identifiers attached, |
design.info |
returns 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
|
ord |
returns an index vector that orders the matrix or data frame;
for example, design[ord(design),] orders the design in increasing order with respect to the first,
then the second etc. factor. |
The package is currently subject to intensive development; most key functionality is now included. Some changes to input and output structures may still occur.
Ulrike Groemping
~~See Also FrF2
, pb
, fac.design