0

I need to do symbolic computation with matrices in R, preferably using the rSymPy package. I am running everything on Mac OS. There is a problem with loading the rJava package, however. I get the following error: 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.5/Resources/library/rJava/libs/rJava.so': dlopen(/Library/Frameworks/R.framework/Versions/3.5/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.5/Resources/library/rJava/libs/rJava.so Reason: image not found

I have read through Problems when trying to load a package in R due to rJava and Unable to load rJava on R, as well as other similar questions. This is very frustrating - any help would be appreciated!

My end goal here is to perform matrix reduction and manipulation in R with variables (i.e. symbolic matrix computations). If there are any other suggestions on how to do this in R, please let me know.

iparde1
  • 13
  • 3

1 Answers1

0

First thing to try is to run the following from a terminal:

R CMD javareconf
BigFinger
  • 1,033
  • 6
  • 7
  • I ran this – now what is the next step? It looks like it updated my Java configuration. – iparde1 Jan 02 '20 at 18:48
  • The output from the terminal? It's a bit long – iparde1 Jan 02 '20 at 22:20
  • Yes, it would help if you edited your question and posted both the output of "R CMD javareconf" from the terminal as well as the output of library(rJava) from R. Try running the latter one more time, after you did the javareconf. You mentioned that you have installed JDK 13.0.1, but R is looking for 11.0.1. After you run javareconf, hopefully R will look for the correct version of the JDK. – BigFinger Jan 02 '20 at 22:29