我是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)
如果我说从源代码安装"是",我收到以下错误: …