plot.factor(x, y=NULL, style="box", rotate=<<see below>>, boxmeans=F, character=<<see below>>, data=NULL)
x
is a factor,
or
x
is a design or data frame
not containing the response
(in which case this argument is required).
If
x
is a formula,
then a design or data frame may be given here.
Or
x
can be the data frame
and
y
the formula.
"box"
(default),
"fraction non0"
,
"shaded bar"
,
and
"character"
.
The names can be abbreviated (one character is enough).
The four styles produce: box-plots;
bar-plots of the fraction of observations not equal to 0;
shaded bars with each shaded area
representing the number of observations having a particular value;
characters plotted at the values of
y
,
the characters given by argument
character=
.
Supplying argument
character=
implies the style.
TRUE
, x-axis labels will be rotated.
The default is
sum(nchar(xalabs))>80
.
TRUE
if you want the mean of the boxplots
to be indicated.
Applicable for
style="box"
only.
x
was given as a formula.
Graphical parameters may also be supplied as arguments to this function (see ).
style
,
a box, bar, shaded bar, or characters will be plotted at each level.
This function is a method for the generic function for class factor. It can be invoked by calling for an object x of the appropriate class, or directly by calling regardless of the class of the object.
A. E. Freeny, A. E. and Landwehr, J. M. (1990), Displays for data from large designed experiments. Computer Science and Statistics: Proceedings of the 22nd Symposium on the Interface. pp 117-126, Springer Verlag.
# Do box plots of all factors: plot.factor(catalyst, Yield ~ ., character = catalyst$Temp, main="Yield, points identified by levels of Temp") plot.factor(skips ~ Opening + Mask, data=solder.balance) # Do character plot of interaction: attach(solder.balance) Boards <- interaction(Solder, Mask, Opening) plot.factor(Boards, skips, character=Panel, rotate=T) plot.factor(skips ~ Opening + Mask)