as mentioned above, I have the following problem:
Error: Aesthetics must be either length 1 or the same as the data (5): label
I'm quite new to R, so I'm not sure what is wrong. If anyone has any input on what I need to change, that would be great!
AvgPadCount <- ggplot(APD) +
aes(x = Species, y = mean, fill = Plot.Type) +
geom_col(position = "dodge") +
geom_errorbar(aes(x = Species, ymin = mean - se, ymax = mean + se), position = position_dodge(0.9), width = 0.2, colour="gray0", alpha=0.9, size=1.3) +
geom_text(label = c("A", "A", "B", "B"), position = position_dodge(0.9), aes(y = mean+se, x = Species), vjust = -0.5, size = 6) +
ylim(0,6) +
ggtitle("Plot Size Effect on Average Pad Count") +
xlab("Species") +
ylab("Average Pad Count per Plant")
MaxClumpHeight <- ggplot(MCH) +
aes(x = Species, y = mean, fill = Plot.Type) +
geom_col(position = "dodge") +
geom_errorbar(aes(x = Species, ymin = mean - se, ymax = mean + se), position = position_dodge(0.9), width =0.2, colour="gray0", alpha=0.9, size=1.3) +
geom_text(label = c("A", "A", "B", "C"), position = position_dodge(0.9), aes(y = mean+se, x = Species), vjust = -0.5, size = 6) +
ylim(0,32) +
ggtitle("Plot Size Effect on Max Clump Height") +
xlab("Species") +
ylab("Mean Max Clump Height (cm)")
AvgPadCount
MaxClumpHeight