| bar.err {agricolae} | R Documentation |
It plots bars of the averages of treatments and standard error or standard deviance. It uses the objects generated by a procedure of comparison like LSD, HSD, Kruskal and Waller-Duncan.
bar.err(x,variation=c("SE","SD","range","IQR"),horiz=FALSE, bar=TRUE,...)
x |
object means of the comparisons the LSD.test, HSD.test,...,etc |
variation |
SE=standard error, range=Max-Min or IQR=interquartil range |
horiz |
Horizontal or vertical bars |
bar |
paint bar |
... |
Parameters of the function barplot() |
x: data frame formed by 5 columns: name of the bars, height, level out: LSD.test, HSD, waller.test, scheffe.test, duncan.test, SNK.test, friedman, kruskal, waerden.test and Median.test.
A list with numeric vectors giving the coordinates of all the bar midpoints drawn.
x |
eje-1 coordinate |
height |
eje-2 coordinate by group |
Felipe de Mendiburu
LSD.test, HSD.test,
waller.test, kruskal, bar.group
library(agricolae) data(sweetpotato) model<-aov(yield~virus,data=sweetpotato) out <- waller.test(model,"virus", console=TRUE, main="Yield of sweetpotato\ndealt with different virus") par(mfrow=c(2,2),cex=1) bar.err(out$means,variation="range",horiz=TRUE,xlim=c(0,45),angle=125,density=6, main="range") bar.err(out$means,variation="SD",ylim=c(0,45),col=colors()[30], main="Standard deviation",density=8) bar.err(out$means,variation="SE",horiz=TRUE,xlim=c(0,45),density=8, col="brown",main="Standard error") bar.err(out$means,variation="range",ylim=c(0,45),bar=FALSE,col="green", main="range") par(mfrow=c(1,2),cex=1) bar.err(out$means,variation="range",ylim=c(0,45),bar=FALSE,col=0) abline(h=0) # horiz = TRUE bar.err(out$means,variation="SE",horiz=TRUE,xlim=c(0,45),bar=FALSE,col=0) #startgraph par(mfrow=c(1,1)) #endgraph