A.Roberto
A.Roberto

Reputation: 1

Error message when installing ggplot2

I have been trying to install ggplot2 but get the following error:

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : namespace ‘scales’ 0.4.0 is being loaded, but >= 0.4.1 is required
ERROR: lazy loading failed for package ‘ggplot2’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/ggplot2’

Just so you know, I am using RStudio 1.0.136 and R 3.2.1 GUI Snow Leopard. Could it be a problem of compatibility with the old version of R that I am using? Does anyone know what the above means?

Upvotes: 0

Views: 3221

Answers (2)

morta
morta

Reputation: 21

if you are on windows try : install.packages("ggplot2", type="win.binary",dependencies = TRUE) else check the documentation in type and binary packages sections for the correct type according to your os : https://www.rdocumentation.org/packages/utils/versions/3.5.2/topics/install.packages

Upvotes: 0

fzk
fzk

Reputation: 441

install.packages("scales")
install.packages("ggplot2")

will do the trick. Also try to keep your packages in R updated in the future, since R packages usually depend on the latest versions of other packages.

Upvotes: 1

Related Questions