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 aes
in 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!