![](/img/trans.png)
[英]R 3.1.1 installs ggplot2 successfully but cannot find file to load
[英]Cannot load ggplot2 in R
我尝试加载ggplot2并收到以下错误消息。
library(ggplot2)
sh: otool: command not found
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: system2("otool", c("-L", shQuote(DLL)), stdout = TRUE)
error: error in running command
Error: package or namespace load failed for ‘ggplot2’
假设您使用的是Mac OSX,则可以通过删除X11(“应用程序”>“实用程序”>“ X11”)以及“ / opt”中的文件夹(从Finder转到文件夹> / opt)来解决此问题。 然后,重新安装X11( http://xquartz.macosforge.org/trac )。 重新启动R会话,您应该一切顺利。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.