plot(SG, aes(fill=AGE, y=OC, x=AGE)) +
geom_blank() + theme_bw() +
theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) +
geom_bar(position="dodge", stat="identity", colour="black", size=.3) +
geom_errorbar(aes(ymin=OC-SE, ymax=OC+SE), width=.1, size=.1, # Width of the error bars
position=position_dodge(0)) +
xlab("Crop Age") + ylab("SOC (%)") + ggtitle("") + expand_limits(y=c(NA, 4.5))
the error message is: Error in plot(SG, aes(fill = AC, y = OC, x = AC)) + geom_blank() :
Any help is appreciated.