boxplot.SK: Boxplot SK Objects

View source: R/boxplot.SK.R

boxplot.SKR Documentation

Boxplot SK Objects

Description

S3 method to plot SK objects.

Usage

## S3 method for class 'SK'
boxplot(x,
         mean.type   = c('line', 'point', 'none'),
         xlab        = NULL,
         mean.col    = 'gray',
         mean.pch    = 1,
         mean.lwd    = 1,
         mean.lty    = 1,
         args.legend = NULL, ...)

Arguments

x

A SK object.

mean.type

The type of mean representation to be plotted. The default is “line”.

xlab

A label for the ‘⁠x⁠’ axis.

mean.col

A vector of colors for the means representation.

mean.pch

A vector of plotting symbols or characters. Used only when mean.type = 'point'.

mean.lwd

Line width of mean.

mean.lty

Line type of the mean. Used only when mean.type = 'line'.

args.legend

List of additional arguments to be passed to legend; The default is NULL.

...

Optional plotting parameters.

Details

The boxplot.SK function is an S3 method for plotting SK objects. It extends the generic boxplot function by overlaying Scott & Knott group labels above the plot frame and drawing the treatment mean within each box.

Author(s)

Faria, J. C. (joseclaudio.faria@gmail.com)
Jelihovschi, E. G. (eniojelihovs@gmail.com)
Allaman, I. B. (ivanalaman@gmail.com)

References

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

See Also

boxplot

Examples

##
## Examples: Completely Randomized Design (CRD)
## More details: demo(package='SK')
##

library(ScottKnott)
data(CRD1)

## From: formula
## Simple
sk1 <- SK(y ~ x,
          data=CRD1$dfm,
          which='x')
boxplot(sk1)

## A little more elaborate
boxplot(sk1,
        mean.lwd=1.3,
        mean.col='red')

## More customisation
boxplot(sk1,
        mean.lwd=1.3,
        mean.lty=2,
        mean.col='red',
        args.legend=list(x='bottomleft'))

## With point type
boxplot(sk1,
        mean.type='point')

boxplot(sk1,
        mean.type='point',
        mean.pch=19,
        cex=1.5,
        mean.col='red')

## With a different point symbol
boxplot(sk1,
        mean.type='point',
        mean.pch='+',
        cex=2,
        mean.col='blue',
        args.legend=list(x='bottomleft'))

ScottKnott documentation built on May 24, 2026, 5:06 p.m.