Learn R Programming

easyanova (version 11.0)

box.plot: Box plot

Description

Plot quartis

Usage

box.plot(data,test=1, xlab=NULL, ylab=NULL,legend=TRUE,
letters=TRUE, family="Times", bg="white",  cex.axis=0.7,...)

Value

Returns box plots and test of Kruskall-Wallis and Friedman

Arguments

data

data.frame with data (see examples)

test

type of test 1 = Kruskall-Wallis 2 = Friedman

xlab

name of x-axis

ylab

name of y-axis

legend

TRUE = plot p-value of test FALSE = not plot p-value

letters

TRUE = plot letters FALSE = not plot letters

family

font of plot

bg

background color

cex.axis

font size in the axis

...

more plot parameters

Author

Emmanuel Arnhold <emmanuelarnhold@yahoo.com.br>

References

KAPS, M. and LAMBERSON, W. R. Biostatistics for Animal Science: an introductory text. 2nd Edition. CABI Publishing, Wallingford, Oxfordshire, UK, 2009. 504p.

See Also

ea1,ea2, means.plot

Examples

Run this code

#data3: Kaps and Lamberson (2009)
#Description:
##The experiment compared three diets for pigs in a completely randomized design
data(data1)

# Kruskal-Wallis test
box.plot(data1, test=1)

#Description
#Complete randomized block design to determine the average daily gain of steers
data(data2)
box.plot(data2, test=2)

#More plot parameters
box.plot(data2, test=2, col=c(2,7,3), col.axis="red",las=1, 
legend=FALSE, bg="cornsilk", sub="Treatments", cex=1.2);grid(10, lwd=1.5)


Run the code above in your browser using DataLab