rjava

Connect to ORACLE via R, using the info in sql developer

烈酒焚心 提交于 2019-12-24 19:54:14
问题 I am working on a machine without admin rights. I use sql developer to connect to an internal database. I would like to connect via R also. Is there any way I can do this, without admin rights? Some solutions require me to set up a systemDNS - which I can not do. Other requires me to install jvm.dll My environment: Windows7, sqldeveloper, connection method is via TNS file. 回答1: Connecting to SQL Developer via R is far more difficult than other databases I've encountered. It's important that

sudo R CMD javareconf and R CMD javareconf produce different output with java 10

▼魔方 西西 提交于 2019-12-24 19:34:02
问题 I on macOS 10.13.3 and I just update to java 10 and when I've tried to update R to it I just realize that I get two different outputs if I run R CMD javareconf with or without sudo . If I run with sudo it sticks to Java 9, but if I run without sudo it configures java 10. Without sudo : $ R CMD javareconf Java interpreter : /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/bin/java Java version : 10 Java home path : /Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home Java

R: rJava error with xlsx (0.4.2) package

怎甘沉沦 提交于 2019-12-24 00:09:39
问题 I am trying to use the xlsx package to fill a spreadsheet with information from an external file. Up until now, I have used addDataFrame() to put information into the spreadsheet, and everything about it that I have tried has been successful (fonts, colors, borders, etc.) The issue now is that I need to have a column of hyperlinks, and to do that I need to get or create the specific cells (I'm not sure which, and both give the same error). The following code: library(xlsx) wb = createWorkbook

rJava - .jcall calling issue: method with signature not found

这一生的挚爱 提交于 2019-12-23 09:32:06
问题 I am trying to call a method in java class with rJava for a few days and I did not yet figure it out what I am doing wrong. Maybe someone here will have a some clues for me. The situation looks like this: I load library and initializing an object (that's works fine): library(rJava) .jinit('C:/javatemp/worker.jar') jobject <- .jnew("worker.concrete") I list methods and I get fine result: .jmethods(jobject) > [1] "public java.util.List worker.concrete.lookup(java.lang.CharSequence)" I am

Rengine.eval returns null

空扰寡人 提交于 2019-12-23 04:54:12
问题 I have the following implementation: public static void main(String[] args) { // new R-engine Rengine re = new Rengine(new String[] { "--vanilla" }, false, null); if (!re.waitForR()) { System.out.println("Unable to load R"); return; } else System.out.println("Connected to R"); re.eval("library(RMySQL)"); re.eval("library(xts)"); re.eval("library(forecast)"); re.eval("db = dbConnect(MySQL(), user='root', password='', dbname='stats_server', host='localhost')"); re.eval( "data = fetch

Java/R Interface (JRI)

百般思念 提交于 2019-12-22 18:56:13
问题 I want to call some R code from within Java, on a Linux machine that has R installed already, so the Java/R Interface (JRI) is needed. However, I am not sure how to go about this. The JRI homepage says that the package is bundled in rJava. So, I downloaded rJava-0.9.3.tar.gz from the rJava Files section, and unzipped it, getting (among other things) a lot of Java source files (and their corresponding classes) in the src/java folder, plus 2 JARs (JRIEngine.jar and REngine.jar) in the inst/jri

Issues using xlsx package to insert data from R to excel

你离开我真会死。 提交于 2019-12-22 06:38:09
问题 I´m trying to create a new excel workbook from R to save a few small datasets using xlsx package. For some reason it was working fine, but i´m unable to do it again. Code to create a new workbook library("xlsx") library("xlsxjars") library("rJava") file <- "marca_imei.xlsx" wb <- loadWorkbook(file) # The error: # Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : # java.lang.IllegalArgumentException: Your InputStream was neither an OLE2 stream, nor an OOXML stream I´ve

Install rJava on macOS Sierra 10.12.1: linker error licuuc

安稳与你 提交于 2019-12-21 22:31:43
问题 I am trying to install rJava within R-Studio but the error ld: library not found for -licuuc clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [libjri.jnilib] Error 1 make[1]: *** [src/JRI.jar] Error 2 make: *** [jri] Error 2 ERROR: compilation failed for package ‘rJava’ * removing ‘/Users/iMacLinda/Library/R/3.3/library/rJava’ Warning in install.packages : installation of package ‘rJava’ had non-zero exit status R version _ platform x86_64-apple

Can't install rJava 0.9 on Ubuntu 10.04

倖福魔咒の 提交于 2019-12-21 07:03:12
问题 I use R 2.13 from the CRAN apt repo for Ubuntu 10.04, and I'm trying to install Deducer, which requires JGR/rJava, but rJava refuses to build/install, complaining about being unable to build a JNI app. I tried sudo R CMD javareconf as suggested but that only led to a different error about the configuration being unset. I found R: rJava package install failing, so I tried the suggestions there of installing r-cran-rjava (but that's 0.8 and Deducer/JGR seem to insist on installing 0.9) and

rjava .jcall issue

自古美人都是妖i 提交于 2019-12-19 08:12:31
问题 I am currently working on developing an R package to integrate java code within R. However, I am having issues trying to properly call the java class methods. So far I have independently developed and compiled a java program into a class file and then packaged it up as a jar file. A sample of my code is as follows: library(rJava) .jinit() .onLoad <- function(lib, pkg) { pathToSdk <- paste(system.file(package = "mailViz") , "C:\\path\\to\\libs", sep="") jarPaths <- c(paste(pathToSdk, "mail.jar