Generate Factorial Designs

DESCRIPTION:
Returns a design specified by the inputs. Fractional designs may be created for 2 to the k designs.

USAGE:
fac.design(levels, factor.names=<<see below>>, replications=1,
      row.names=<<see below>>, fraction=<<see below>>)

REQUIRED ARGUMENTS:
levels:
vector of the number of levels for the factors in the design.

OPTIONAL ARGUMENTS:
factor.names:
object that names the factors. This may be a vector of character strings which are the names of the factors. It may also be a list, in which case the names attribute of the list is the names of the factors, and the components of the list (which need not be of mode character) label the levels of the corresponding factor. If factor names are not given, they default to A, B, etc. If levels are not given, they default to the factor name (possibly abbreviated) followed by level numbers.
replications:
the number of times the complete design should be replicated.
row.names:
names to use for the rows of the design. The default is 1:nrows, where nrows is the number of observations in the design.
fraction:
definition for the fraction desired in a fractional factorial design. This may either be a numerical fraction (e.g, for a quarter replicate), or a model formula giving one or more defining contrasts (e.g., Fractional factorials are provided only for 2-level factors. By default, a full factorial design is created.

VALUE:
a design corresponding to the factors specified. The design object is a data frame, with variables in the frame corresponding to each of the factors requested in the design. In the case that fraction is specified, an attribute, defcon, will supply the defining contrast(s), and if which.half is supplied, this will also be retained as an attribute.

DETAILS:
fac.design chooses defining contrasts for fractional designs from a standard list called dimdc.list.

WARNING:
Avoid using factor names F and T as these can get confused with FALSE and TRUE. The default factor names skips these two letters.

SEE ALSO:
fractionate , oa.design , randomize , aov , factor.names, design , design.object .

EXAMPLES:
fnames <- list(react = c("4mod", "5mol"),
  acidcon = c("con", "dil"),
  acidamt = c("2mol", "2.5mol"),
  reactim = c("2", "4"),
  reactem = c("low", "high"))
# a 1/4 replicate of a 2^5 design, specifying the -1
# fraction for the first contrast
davies.design <- fac.design(rep(2,5), factor.names = fnames,
  fraction =  ~ - react:acidamt:reactim + react:acidcon:reactem)