Misspecify Argument

So it appears that you have defined an aes object in your global environment. The global environment is the "top level" environment in R and contains every object that is used in your session. When you call getAnywhere(aes)and get that there is an aes object in your global enviromnent (.GlobalEnv), it means that there is an object called aesin your "working area". It might be that this object is loaded when you load R, for example through your .Rprofile file, if you haven't created this object directly.

It might be that when you call aes in your code, the object in your global environment is called rather than the the one from the ggplot2 package. You could try removing the object from your environment by running rm(aes) before re-running your ggplot code.

Hope this helps!

1 Like

UPDATE!! This was the issue after all! Thank you so much! I removed the aes object in my global environment and the plot is running now!

Thank you (and everyone else who has helped me)!

1 Like

That's great, I am glad it worked!

I am very curious about how this object got into your GlobalEnv?

1 Like

tbh, im not quite sure... i was updating R and R studio prior to this issue so not sure if something happened during the update or if it is even related to this.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.