Problem installing ggplot2 packages


#1

Hello,

I am trying to install ggplot2, but it doesn't work. I got these following error messages:

Error : object ‘enexprs’ is not exported by 'namespace:rlang'
ERROR: lazy loading failed for package ‘ggplot2’

  • removing ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/ggplot2’
    Warning in install.packages :
    installation of package ‘ggplot2’ had non-zero exit status

The downloaded source packages are in
‘/private/var/folders/j7/103vkqf91lncd7yphhm_ny2m0000gp/T/RtmphSIPsZ/downloaded_packages’

Can anyone help me ?
(I am a beginner in R).


#2

Did you try:
install.packages("tidyverse")?


#3

Error : object ‘enexprs’ is not exported by 'namespace:rlang'

Install the rlang package:

install.packages("rlang")

Install any missing packages. Then restart RStudio.


#4

Try this...

    install.packages("tidyverse", dependencies = TRUE)

or if you just want ggplot

    install.packages("ggplot2", dependencies = TRUE)

#5

Did you have any success with any of the suggestions so far?

One thing I'm noticing is you appear to be running a fairly old version of R (3.3 — the current release is R 3.5). When running old versions of R, it can get harder and harder to install the latest versions of packages. Have you tried updating to a more recent version of R? You seem to be on Mac OS X, so see here: https://cloud.r-project.org/bin/macosx/ (Note that if you do upgrade to a newer version of R, the installer will make a new library by default and you will need to re-install your packages)


#6

Hello,

thank you for all of your responses. Install.packages ("rlang") solved my problems. (I thought I have tried this idea before).

Ok i will update my R version.


#7

If your question's been answered (even if by you), would you mind choosing a solution? (See FAQ below for how).

Having questions checked as resolved makes it a bit easier to navigate the site visually and see which threads still need help.

Thanks