I just started using R x64 3.6.1. I use a PC with Windows10 64 bit OS. I am able to install "tidyverse" and "rlang" but when I install ggplot2 and execute it, I get the following error,
library(ggplot2) Error: package or namespace load failed for ‘ggplot2’ in inDL(x, as.logical(local), as.logical(now), ...): unable to load shared object 'C:/Users/welcome/Documents/R/win-library/3.6/colorspace/libs/x64/colorspace.dll': LoadLibrary failure: %1 is not a valid Win32 application.
I downloaded 'Rtools' and installed it but still the same error.
I checked. 'colorspace.dll' has a size of 56.5 kB. I followed the default file settings that was recommended by the system when I installed R.
I also tried the following:
install.packages("ggplot2", dependencies = TRUE, repos = "http://cran.us.r-project.org")
library(ggplot2)
I got the same error message. I uninstalled R and R Studio and installed it again.
What am I doing wrong? How do I correct this? Please advise.
thank you.