ggplot2 package loading and activating issue

install.packages("ggplot2")
library(ggplot2)

Getting below error when i try to activate ggplot2 package

library(ggplot2)
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘colorspace’
Error: package or namespace load failed for ‘ggplot2’

Try installing colorspace separately.

install.packages("colorspace")

and then see what happens.

Also, unless this works for you in R but not in (see FAQ below for disambiguation), I don't think it's IDE-related. So, I'm going to move this out of the IDE category and into General.

1 Like

Thank you.
Now able to activate the package after installing "colorspace" package.

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

Looks like this is an issue for which the solution was already given.
I had similar issues recently.
The solution that worked for me, was the same as the one that was suggested already: to re-install any "missing" package individually. I had to re-install two "missing" packages one after the other.