Learn R Programming

TukeyC (version 1.0-6)

plot.TukeyC: Plot TukeyC and TukeyC.nest Objects

Description

S3 method to plot TukeyC and TukeyC.nest objects.

Usage

## S3 method for class 'TukeyC':
plot(x,
     result=TRUE,
     replicates=TRUE,
     pch=19,
     col=NULL,
     xlab=NULL,
     ylab=NULL,
     xlim=NULL,
     ylim=NULL,
     id.lab=NULL,
     id.las=1,
     rl=TRUE,
     rl.lty=3,
     rl.col='gray',
     mm=TRUE,
     mm.lty=1,
     title='', \dots)

Arguments

x
A TukeyC object.
result
The result of the test (letters) should be visible.
replicates
The number of replicates should be visible.
pch
A vector of plotting symbols or characters.
col
A vector of colors for the means representation.
xlab
A label for the x axis.
ylab
A label for the y axis.
xlim
The x limits of the plot.
ylim
The y limits of the plot.
id.lab
Factor level names at x-axis.
id.las
Factor level names written either horizontally or vertically.
rl
Horizontal line connecting the circle to the y-axis.
rl.lty
Line type of rl.
rl.col
Line color of rl.
mm
Vertical line through the circle (mean value) linking the minimum to the maximum of the factor level values corresponding to that mean value.
mm.lty
Line type of mm.
title
A title for the plot.
...
Optional plotting parameters.

Details

The plot.TukeyC function is a S3 method to plot Tukey and TukeyC.nest objetcs. It generates a serie of points (the means) and a vertical line showing the minimum e maximum of the values corresponding to each group mean.

References

Murrell, P. (2005) R Graphics. Chapman & Hall/CRC Press.

See Also

plot

Examples

Run this code
##
  ## Examples: Completely Randomized Design (CRD)
  ## More details: demo(package='TukeyC')
  ##

  library(TukeyC)
  data(CRD2)

  ## From: vectors x and y
  tk1 <- with(CRD2,
              TukeyC(x=x,
                     y=y,
                     model='y ~ x',
                     which='x'))
  plot(tk1, id.las=2, rl=FALSE)

  ## From: design matrix (dm) and response variable (y)
  tk2 <- with(CRD2,
              TukeyC(x=dm,
                     y=y,
                     model='y ~ x',
                     which='x',
                     sig.level=0.005))
  plot(tk2, mm.lty=3, id.las=2, rl=FALSE)

  ## From: data.frame (dfm)
  tk3 <- with(CRD2,
              TukeyC(x=dfm,
                     model='y ~ x',
                     which='x'))
  plot(tk3, id.las=2, rl=FALSE)

  ## From: aov
  av <- with(CRD2,
             aov(y ~ x,
             data=dfm))
  summary(av)

  tk4 <- with(CRD2,
              TukeyC(x=av,
                     which='x'))
  plot(tk4, rl=FALSE, id.las=2)

Run the code above in your browser using DataLab