plot.design(x, y, fun = mean, ...)
Graphical parameters may also be supplied as arguments to this function (see par).
There are two basic styles for calling this method. If x is a design or data frame, then y can select a response variable from the design or, if y is a formula, it can define both terms and response, relative to the given design. Conversely, if x is not a design, it is assumed to be a formula or terms object, or something else from which a model frame can be computed. Then the design factors and response are determined from that model frame.
The function supplied in the fun argument will be called once for each level of each factor in the design. A plot will show these summary values. The levels for a particular factor are shown along a vertical line, and the overall value of fun() for the response is drawn as a horizontal line.
# draw trimmed means plot.design(catalyst, fun = function(x) mean(x, trim = .05), col = 2) #choose which factors to include in the plot plot.design(Yield ~ Conc + Cat, data = catalyst)