rjava

Unable to load rJava on R

微笑、不失礼 提交于 2019-12-17 05:01:02
问题 I wish to load rJava in R x64 3.1.2. OS- Windows 8.1 64 bit Though installation seems to work fine: > install.packages("rJava") Installing package into ‘C:/Users/sony/Documents/R/win-library/3.1’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.1/rJava_0.9-6.zip' Content type 'application/zip' length 758898 bytes (741 Kb) opened URL downloaded 741 Kb package ‘rJava’ successfully unpacked and

Unable to load rJava on R

守給你的承諾、 提交于 2019-12-17 05:00:01
问题 I wish to load rJava in R x64 3.1.2. OS- Windows 8.1 64 bit Though installation seems to work fine: > install.packages("rJava") Installing package into ‘C:/Users/sony/Documents/R/win-library/3.1’ (as ‘lib’ is unspecified) --- Please select a CRAN mirror for use in this session --- trying URL 'http://cran.utstat.utoronto.ca/bin/windows/contrib/3.1/rJava_0.9-6.zip' Content type 'application/zip' length 758898 bytes (741 Kb) opened URL downloaded 741 Kb package ‘rJava’ successfully unpacked and

Call a java method in R using rJava

我是研究僧i 提交于 2019-12-14 00:39:22
问题 I use rJava to call a java code from R, trying to call an algorithm from SPMF tool. I tried to use a wrapper function as in this question, but this did not work with the SPMF code. this is my R code: library(rJava) .jinit() .jaddClassPath ( "C:/mydrive/eclipse-workspace/myfile/src") print(.jclassPath()) obj <- .jnew("AlgoFPGrowth_Strings") s <- .jcall(obj, returnSig= "V", method="runAlgorithm", "input.csv","output.txt") , 0.4 ) it gives me error ,method runAlgorithm with signature (D)V not

Install rJava package on AWS EC2 instance

帅比萌擦擦* 提交于 2019-12-13 20:17:09
问题 I am using R on AWS EC2 instance. I am trying to send a mail using the "mailR" package. I was told that to install the package I should previously install the package "rJava" as "mailR" depends on it. When trying to install "rJava" I get this error: gcc: error: libgomp.spec: No such file or directory After a quick search, I saw a post on this link explaining this: "You have to make sure your GCC has OpenMP support enabled. Make sure you select OpenMP from the optional packages when installing

Make rJava or R to use a different (previous) Java version

﹥>﹥吖頭↗ 提交于 2019-12-13 02:59:17
问题 It seems that the last java version makes rJava not able to load or compile / install. Is there any way I can have java8 and java9 installed and force rJava or R use the java8 version? Edit: It's been suggested that perhaps this thread is the solution to my problem, but it isn't. Since I need to use a lower version, not the new one. Seems that it's possible to tell R where is the java_home, but I don't know how. 回答1: Take a look here: R, Java, rJava and macOS adventures and here: R 3.4, rJava

Reading R-Errors through JRI

可紊 提交于 2019-12-12 13:05:44
问题 i'm using JRI, to talk to R through Java. If i try to get the result of my R-Code as Double i get a NullPointer. Normally this is caused by an error of R. Is it possible to get the output of the R-Console into Java in order to read the error? 回答1: Ok. Here is what I did, to solve the problem. because my REngine is a singleton i was able to perform those R-Expressions, after the creation: re.eval("log<-file('"+filepath+"')"); re.eval("sink(log, append=TRUE)"); re.eval("sink(log, append=TRUE,

rJava 'class not found' error with makeCluster

半世苍凉 提交于 2019-12-12 02:16:08
问题 I'm having this issue for a while now and can't find answers online. I try to execute makeCluster and somehow get this Error in .jfindClass(as.character(driverClass)[1]) : class not found library(doParallel) library(foreach) cores = makeCluster(2) # Loading required package: methods # Loading required package: DBI # Loading required package: rJava # Error in .jfindClass(as.character(driverClass)[1]) : class not found # Calls: JDBC -> is.jnull -> .jfindClass # Execution halted Would anyone be

rJava .jcall return type issue

你离开我真会死。 提交于 2019-12-11 16:07:52
问题 I am facing an issue with returning any type of array with .jcall() . Here is my code. public class Test(){ public static double[] sample(){ double[] nobjarr = new double[5] nobjarr[0] = 1.0; nobjarr[1] = 1.0; nobjarr[2] = 1.0; nobjarr[3] = 1.0; nobjarr[4] = 1.0; return nobjarr; } } In R, I am calling using .jcall library(rJava) .jinit() .jaddClassPath("path to .class file") objT <- .jnew("Test") res <- .jcall(objT,"[D","sample") For this I get an error saying "Error in .jcall(objT, "[D",

Installed rJava, Installed Java 8 update. Still cannot load rJava on MacOS Sierra

橙三吉。 提交于 2019-12-11 15:21:11
问题 Bear in mind that I am computer illiterate and new to R. I have installed the rJava package in R studio version 1.0.143 and installed Java 8 (using MacOS Sierra). When I try to load the rJava package: library(rJava) I get the following error Unable to find any JVMs matching version "(null)". No Java runtime present, try --request to install. Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...)

Issue while connecting rJava in R Studio

独自空忆成欢 提交于 2019-12-11 14:08:34
问题 I installed the rJava package but it's showing the following issue while using the library library("rJava") 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