Error in my graph NEED HELP URGENTLY

hello there
really need help on something as i've been working on this for a while and still cannot figure out what is going on with my graph.
i've been trying to add error bars to my graph, but everytime i run the code it says

Error in geom_errorbar():
! Problem while computing aesthetics.
:information_source: Error occurred in the 2nd layer.
Caused by error:
! object 'log_cfu' not found

here is my graph code:

need help.
please and thank you...

Your call to ggplot lists log_cfu as the y aesthetic. Check the rest of your code and make sure that log_cfu is assigned a value prior to the plot call.

1 Like

Given the error message, this is my guess.

Is log_cfu in both allcfus and summary? If the geom_error layer changes the data to summary but inherits y = log_cfu, from the initial aes, you might need that variable in summary too.

1 Like