Hello, this is the error I keep getting:
Error in geom_errorbar()
:
! Problem while computing
aesthetics.
Error occurred in the 2nd layer.
Caused by error:
! object 'cellsgram' not found
this is my code:
allnutrient_summary <- allnutrient %>%
group_by(nutrient, hexadecane) %>%
summarise(mean = mean(cellsgram),
std = sd(cellsgram),
n = length(cellsgram),
se = std/sqrt(n))
ggplot(allnutrient, aes (x = factor(nutrient), y = cellsgram, fill = hexadecane, color = hexadecane)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(data = allnutrient_summary,
aes(x = nutrient,
ymin = mean - se,
ymax = mean + se,
group = hexadecane))
anyone know what to do??