Cla*_*ire 8 macos r rgl osx-elcapitan
我是R的新编程所以如果我看起来天真,我会事先道歉.我希望能够对我的3D数据进行一些主成分分析.我读到"pca3d"函数对此有好处,但我需要下载"rgl"库.当我使用install.packages时,它会询问:
install.packages("rgl")
There is a binary version available but the source version is later:
binary source needs_compilation
rgl 0.95.1201 0.95.1367 TRUE
Do you want to install from sources the package which needs compilation?
y/n: n
Run Code Online (Sandbox Code Playgroud)
我已经尝试将它安装为二进制和源代码,但似乎没有任何效果.如果我尝试加载二进制版本,我会收到此错误:
Error : .onLoad failed in loadNamespace() for 'rgl', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl/libs/rgl.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl/libs/rgl.so, 6): Library not loaded: /opt/X11/lib/libGLU.1.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl/libs/rgl.so
Reason: image not found
Error: package or namespace load failed for ‘rgl’
Run Code Online (Sandbox Code Playgroud)
如果我说从源代码安装"是",我收到以下错误:
configure: error: X11 not found but required, configure aborted.
ERROR: configuration failed for package ‘rgl’
* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgl’
Warning in install.packages :
installation of package ‘rgl’ had non-zero exit status
Run Code Online (Sandbox Code Playgroud)
我一直在寻找如何使这项工作的时间,所以如果有人可以试图我应该如何安装rgl包,那么我将非常感激!
谢谢,克莱尔
| 归档时间: |
|
| 查看次数: |
15472 次 |
| 最近记录: |