Forum Discussion
Error: package or namespace load failed for 'ggplot2': package 'ggplot2' was installed before R 4.0.
Hi webportal
Try below solution:
Find the root folder of R :
Run it and input :
install.packages("ggplot2")
then enter "yes>yes.." until finished.
- webportal5 years ago
Impactful Individual
Hi,
Sure; I did that as per my post above. - dpombal5 years ago
Post Partisan
Not worked for me
Stack Trace:
Microsoft.PowerBI.ExploreServiceCommon.ScriptHandlerException: Error del script R.
Error: package or namespace load failed for 'ggplot2':
package 'ggplot2' was installed before R 4.0.0: please re-install it
Ejecución interrumpida
---> Microsoft.PowerBI.Scripting.R.Exceptions.RScriptRuntimeException: Error del script R.
Error: package or namespace load failed for 'ggplot2':
package 'ggplot2' was installed before R 4.0.0: please re-install it
Ejecución interrumpida - dpombal5 years ago
Post Partisan
Problem 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!