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, std = TRUE, horiz = FALSE, ...)
x |
object or comparisons the LSD.test, HSD.test,...,etc |
std |
Standard deviation or standar error |
horiz |
Horizontal or vertical bars |
... |
Parameters of the function barplot() |
x: data frame formed by 5 columns: name of the bars, height, level replications and standard error of the bar. std = T : standard deviation. std = F : standard error.
x |
object |
std |
TRUE or FALSE |
horiz |
TRUE or FALSE |
... |
Parameters of the function barplot() |
Felipe de Mendiburu
LSD.test
, HSD.test
, waller.test
,
kruskal
, bar.group
library(agricolae) data(sweetpotato) model<-aov(yield~virus,data=sweetpotato) df<-df.residual(model) MSerror<-deviance(model)/df Fc<-anova(model)[1,4] attach(sweetpotato) comparison <- waller.test(yield,virus,df, MSerror, Fc, main="Yield of sweetpotato\ndealt with different virus") detach(sweetpotato) # std = FALSE (default) is standard error #startgraph par(mfrow=c(2,2),cex=1) bar.err(comparison,horiz=TRUE,xlim=c(0,45),angle=125,density=6, main="Standard deviation") bar.err(comparison,std=FALSE,horiz=TRUE,xlim=c(0,45),density=8, col="brown",main="Standard error") bar.err(comparison,ylim=c(0,45),density=4,angle=125,col="green", main="Standard deviation") bar.err(comparison,std=FALSE,ylim=c(0,45),density=10,col="blue", main="Standard error") par(mfrow=c(1,1)) #endgraph