[英]Error: package or namespace load failed for 'ggplot2': package 'ggplot2' was installed before R 4.0.0: please re-install it Execution halted
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安装 R 4.0.2 后,我在 Power BI Desktop 中的 R 可视化中收到此错误消息
"Error: package or namespace load failed for 'ggplot2':
package 'ggplot2' was installed before R 4.0.0: please re-install it.
Execution halted"
I already tried to:我已经尝试过:
reinstall R 4.0.2
reinstall RStudio
reinstall ggplot2
reinstall all packages
reinstall Power BI Desktop. My version is August-2020
Still it does not work.它仍然不起作用。
Considerations:注意事项:
My visualizations were working well before I installed R 4.0.2
My visualizations are working well on other PCs
When I run the code on RStudio I don't get any error
Any thoughts?有什么想法吗?
You probably need to go here: https://powerbi.microsoft.com/en-us/support/ , but some guesses:您可能需要去这里: https : //powerbi.microsoft.com/en-us/support/ ,但有些猜测:
When you did the reinstall, you didn't clean up the old one, so you now have a mix of old and new versions of things.当你重新安装时,你没有清理旧的,所以你现在有新旧版本的混合。 If you can run R code, run如果您可以运行 R 代码,请运行
system.file(package="ggplot2")
That's where it is finding the bad version of ggplot2
.这就是它找到错误版本的ggplot2
。 Get rid of it, and reinstall.摆脱它,并重新安装。 If that's not enough, run如果这还不够,请运行
.libPaths()
in the broken copy of R. Completely eradicate every directory mentioned there, and reinstall R and all of your contributed packages.在 R 的损坏副本中。完全删除那里提到的每个目录,并重新安装 R 和所有你贡献的包。 (I don't use Power BI, so this might also require you to wipe out some part of it: do so, and reinstall it.) (我不使用 Power BI,因此这可能还需要您清除其中的某些部分:这样做,然后重新安装。)
After all of this, run在这一切之后,运行
packageDescription("ggplot2")
In the last line (or close to it) of what gets printed, you should see something like this:在打印内容的最后一行(或接近它)中,您应该看到如下内容:
Built: R 4.0.2; ; 2020-07-16 22:49:23 UTC; unix
If you see that it was built before 4.0.2, then either you missed deleting something, or you (or Microsoft) reinstalled some old version.如果您看到它是在 4.0.2 之前构建的,那么要么您错过了删除某些内容,要么您(或 Microsoft)重新安装了某个旧版本。 Then it's probably time to contact that URL above.那么可能是时候联系上面的那个 URL 了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.