The Error I am getting is:
Error: unexpected symbol in "BPM_Plot<-ggplot(CleanBPMdata, aes(x = Heart Rate"
geom_bar(stat = "identity", color = "black",
-
position = position_dodge()) +
- geom_errorbar(aes(ymin = mean_BPM-se_BPM, ymax = mean_BPM + se_BPM), width = .2) +
- labs(x = "Heart Rate", y = "Beats per minute (BPM)") +
- theme_classic()
Error: Cannot add ggproto objects together. Did you forget to add this object to a ggplot object?
Runrlang::last_error()
to see where the error occurred.
This is my code:
BPM_Plot<-ggplot(CleanBPMdata, aes(x = Heart Rate, y = mean_BPM)) +
geom_bar(stat = "identity", color = "black",
position = position_dodge()) +
geom_errorbar(aes(ymin = mean_BPM-se_BPM, ymax = mean_BPM + se_BPM), width = .2) +
labs(x = "Heart Rate", y = "Beats per minute (BPM)") +
theme_classic()
Any help would be greatly appreciated.