Using R in MAC OS Sierra

I am making a Capstone project from Coursera Data Science using R Studio, using some packages like RWeka, rJava, RWekajars that need Java.

I am not a Java specialist, but I install the JRE and JDK in the same version of "1.8.0_101".

When the Tokenization algorithm is running, it aborts with the following message:

Error in .jnew (name): java.lang.UnsupportedClassVersionError: weka / core / tokenizers / NGramTokenizer: Unsupported version of major.minor 51.0

I read a lot about this in other issues, but everything I tried does not work.

Let me know if anyone has the same problem and is there a solution?

Thank. (My equipment is a MAC i5 with 8 GB and 1 TB HD. My software is MacOS Sierra 10.12).

+4
source share
1 answer

I'm not sure if this is the root cause of the problem, but I had to follow these steps to install rJava and RWeka.

These commands are required to properly install rJava and the remaining libraries.

sudo ln -s $(/usr/libexec/java_home)/jre/lib/server/libjvm.dylib /usr/local/lib

sudo R CMD javareconf

LD_LIBRARY_PATH=$(/usr/libexec/java_home)/jre/lib/server: open -a RStudio

install.packages("rJava",type='source')

install.packages("RWeka",type='source')

install.packages(c("NLP", "openNLP", "qdap"))
+3
source

Source: https://habr.com/ru/post/1657272/


All Articles