Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Error: package ‘ggplot2’ could not be loaded

Hi plotly community,

I have problems installing/using the plotly library in R, see below. I always get an error that the ggplot2 package is required. I am running the latest R-Studio version (mac). I also installed the ggplot2 package separately with the same error…

Any advice?

trying URL '
Content type ‘application/x-gzip’ length 806762 bytes (787 KB)
downloaded 787 KB

The downloaded binary packages are in

Loading required package: ggplot2
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘colorspace’
Error: package ‘ggplot2’ could not be loaded

In this particular instance you’ll have to install colorspace as well. Try running install.packages("colorspace") first.