Coerce Data Frame to Class fac.design

DESCRIPTION:

Coerces a data frame to a fac.design object, with factors, blocks and center points as designated.

USAGE:

as.fac.design(x, factors = seq(length(x)),  
          block = F, cpoints = F) 

REQUIRED ARGUMENTS:

x
a data frame, typically created by a call to read.table.

OPTIONAL ARGUMENTS:

factors
subsetting expression for columns of x to use as factors. Can be vector of column numbers or names.
block
Numeric. Which column is the blocking variable.
cpoints
vector indicating the rows that are center points in the design. A design with center points has an additional factor, "Quad", which distinguishes design points from center points.

VALUE:

an object of class fac.design.

DETAILS:

The functions fac.aov and plot.design rely on the data having attributes of the class fac.design. When the experiment is read from an external file, a user can use as.fac.design to interface easily to the fractional factorial functions of the S+DOX module.

If cpoints are designated, an extra, non-printing variable, Quad, is added to the returned fac.design. This factor is used by formula.fac.design to fit a quadratic term, testing center points versus design points, in the model fit by fac.aov.

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:

, ,

EXAMPLES:

raw.data <- read.table(file="myfile.txt",header=T) 
data.design <- as.fac.design(raw.data, 1:4)