ggplot2 install

Hi everyone,
I'm trying to use ggplot function to draw plots.
I have downloaded ggplot2 by using a command install.packages(''ggplot2''), then
library()
But, it shows the Error:

library(ggplot2)
Error: package or namespace load failed for ‘ggplot2’:
package ‘glue’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
In addition: Warning message:
package ‘ggplot2’ was built under R version 3.6.3

I don't know how to fix this problem.
Any advice is really appreciated!
Thank you!

Hi @Mui_Nguyen,
Try installing package "glue", and then updating "ggplot2":

install.packages("glue")
update.packages("ggplot2") 

HTH

1 Like

What is your version of R?

Hi isaid,

Yes, I have updated R version and the problem was solved.

Many thanks!

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

Hi DavoWW,

Thank you for your reply. The problem was solved.