Can't install 'ks' package in R - r

I'm using R 3.0.2 and RStudio 0.98.945 for Mac.
Loading 'ks' package gives this error message.
Loading required package: rgl
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.0/Resources/library/rgl/libs/rgl.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgl/libs/r gl.so, 6): Library not loaded: /usr/X11/lib/libGLU.1.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/rgl/libs/rgl.so
Reason: image not found
Error: package ‘rgl’ could not be loaded
Loading 'rgl' package gives the same error message.
How can I solve this?

Related

Unable to load RWeka package

I have tried adding the path in the terminal using the solution given here and it said was successfully added but still I am unable to load the RWeka package.
It is giving me the below error -
Error: package or namespace load failed for ‘RWeka’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so, 6): Symbol not found: _EXTPTR_PTR
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so
Expected in: /Library/Frameworks/R.framework/Resources/lib/libR.dylib
in /Library/Frameworks/R.framework/Versions/4.0/Resources/library/rJava/libs/rJava.so
In addition: Warning message:
package ‘RWeka’ was built under R version 4.0.2
What could be done? Please Help!

rJava and tabulizer not working on mac Catalina

I have tried everything to try and get rJava to load but I have failed. Any suggestions as to how I can solve this problem? When I run library(rJava) in R (not R studio) it seems to load.
Sys.setenv(JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/")
library(tabulizer)
Error: package or namespace load failed for ‘tabulizer’:
.onLoad failed in loadNamespace() for 'tabulizerjars', details:
call: NULL
error: .onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rJava/libs/rJava.so
Reason: image not found

‘rJava’ could not be loaded after installing R version 3.4

Loading required package: xml2
Loading required package: rJava
Loading required package: methods
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object
'/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: #rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/r Java.so
Reason: image not found
Error: package ‘rJava’ could not be loaded
Execution halted
I'm getting this error a day after I installed version 3.4 of R. I tried solutions from other pages but it didn't work. I can't run R scripts through the terminal but I run scripts on RStudio. I'm thinking that it might be a problem with paths, but I just wanted to double check here and confirm instead of getting myself into a deeper mess.

Issues with loading XLConnect library in R

I have installed XLConnect package though my R studio. When I try to load the library I get the following error
> library(XLConnect)
Loading required package: XLConnectJars
Error: package or namespace load failed for ‘XLConnectJars’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: #rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
Reason: image not found
Error: package ‘XLConnectJars’ could not be loaded
I checked the /Library/Frameworks/R.framework/Versions/3.4/Resources/library folder and I am noticed all three mentioned libraries(XLConnect, XLConnectJars, rJava) already present.

Error while loading "rgl" package in R on mac os x

I have an error when try to open rgl library:
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.1/Resources/library/rgl/libs/rgl.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/rgl/libs/rgl.so, 6): Library not loaded: /opt/X11/lib/libGLU.1.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/rgl/libs/rgl.so
Reason: image not found
Any solutions?
You need to have XQuartz installed on OSX for rgl to work.

Resources