pretty much what it says. i cant seem to create my scatterplot with the code that my prof basically hand fed to us
ggplot(df1, aes(mean, y)) +
geom_point() +
geom_errorbar(aes(ymin = lwr, ymax = upr, xmin = left, xmax = right))
the error message says this
Error in `geom_point()`:
! Problem while computing aesthetics.
ℹ Error occurred in the 1st layer.
Caused by error in `FUN()`:
! `data` must be uniquely named but has duplicate columns
names(df1) <- make.unique(names(df1)). Still, you should check which (and why some) columns have the same name. For more help please provide a minimal reproducible example including a snippet of your data or some fake data best shared viadput(), ie.. rundput(head(df1))and copy the output into your post..make.unique(.)will fix the symptom, I'll emphasize a bit more stefan's note that "you should check" ... something in the previous processing of this data is either wrong (coder intent) or has failed to preserve unique names (bug or mis-use of function). Find whereever in your code path that created the non-unique names and fix that step, far far better than patching the symptom. Bottom line, while the error is fromggplot2, the problem is with the data, and we don't have that. Good luck!