Displaying 1 result from an estimated 1 matches for "bartabl".
Did you mean:
bartab
2008 Oct 26
1
Using the legend function inside a bar chart error.bars function
...lt;-0
var.table<- tapply(Response,list(x1,x2),var)
n.table<- tapply(Response,list(x1,x2),length)
# standard errors bit
std.errors<-sqrt(var.table/n.table)
std.errors[is.na(std.errors)]<-0
biggest.value<-max(mean.table+std.errors)
# Barchart plotting bit
# COMMENTED OUT CODE bartable<-barplot(mean.table, beside=TRUE, ylim=c(0,biggest.value+1), col=c("lightblue", "mistyrose"))
bartable<-barplot(mean.table, beside=TRUE, ylim=c(0,biggest.value+1), col=c("lightblue", "mistyrose"), legend=rownames(mean.table))
# Error bars
errbar.wi...