Forum Discussion
webportal
Impactful Individual
5 years agoError: package or namespace load failed for 'ggplot2': package 'ggplot2' was installed before R 4.0.
I'm really stuck and need some help. After installing R 4.0.2, I'm getting this error message on R visualizations in Power BI Desktop which were previously working "Error: package or namespace ...
v-diye-msft
Community Support
5 years agoHi webportal
Try below solution:
Find the root folder of R :
Run it and input :
install.packages("ggplot2")
then enter "yes>yes.." until finished.
dpombal
Post Partisan
5 years agoProblem is solved after DELETING old libraries inside
"<user>/documents/R" and in "<user>/library"
You can see in .libPaths 2 routes but....PowerBI also uses... "C:\<user>/library" ....remove old ones from here
- "C:\<user>/documents/R"
- C:\Program Files\R\R-4.0.2\library
- webportal5 years ago
Impactful Individual
Actually, I had also tried that. I had conflicting versions of packages, and deleted all the old ones and reinstalled everything again to 4.0.2.
It didn't work, so I uninstalled all 4.0.2 again, including R Gui and R Studio and reinstalled all 3.6.3. and it finally worked!