search for: voidev

Displaying 9 results from an estimated 9 matches for "voidev".

Did you mean: voided
2009 Mar 19
4
Import R-output into Java
Hello, I want to import R-output via Rserve to Java, especially for the function ctree from the package party. Rserve is working properly. Yet, I only get the predictions with the Java code try{ RConnection c = new RConnection(); ... c.voidEval("modell <- ctree(...)"); REXP y = c.eval("nodes(modell,1)[[1]]$prediction"); ... }catch(Exception e){} When I try to get the whole text with REXP z = c.eval("nodes(modell,1)[[1]]"); System.out.println(z); I get something like org.rosud...
2009 Jan 10
0
Rserve/RandomForest does not work with a CSV?
...randomForest() works fine. Either way can be done inside of R, and they work great. Rserve is running as root, and our Java application is running inside of Tomcat, and is also running as root. The actual code looks something like: RConnection conn = new RConnection("127.0.0.1"); conn.voidEval("library('randomForest')"); conn.voidEval("train<-read.csv(\"" + (outfile.getAbsolutePath()) + "\",header=FALSE)"); conn.voidEval("x<-train[1:" + totalTrainData + ",1:11]"); conn.voidEval("y<-as.factor(train[1:&quot...
2009 Mar 13
0
ctree from Java via Rserve
Hi, I want to run the R-function ctree (package party) from Java over Rserve with the following Java-Code: try{ RConnection v = new RConnection(); v.voidEval("library(party)"); v.voidEval("try(load(\"C:\\Documents and Settings\\daten2.rda\"))"); v.voidEval("try(pdf(\"C:\\Documents and Settings\\test4.pdf\"))"); v.voidEval("plot (ctree(ZF2~TKL_f+Regio_f+km1000+SF_f+Geschlecht_f+Alter_VN+Random, da...
2005 Dec 09
0
Multiple Figure environment through Java
...am trying to create a .jpg file with multiple graphs on it. I am creating this file through a java servlet which connects to R using RServe. In the code below, col is an int array which has a list of the col numbers of the data file whose data i have to use for plotting. c=new Rconnection(); c.voidEval("data<-read.table(\"table50.txt\",header=TRUE,sep=\"\t\")"); REXP xp=c.eval("jpeg(\"plot_2.jpg\")"); c.voidEval("par(mfcol=c("+col.length+","+col.length+"))"); c.voidEval("par(oma=c(2,0,3,0))");...
2005 Aug 22
1
Fetching Warning Messages
...s of R : import org.rosuda.JRclient.*; ---------------------------RWarning.java----------------------- class RWarning { public static void main(String args[]) { try { String hostName = null; hostName = args[0]; Rconnection c = new Rconnection(hostName); c.voidEval("lastWarning <- NULL"); c.voidEval("withCallingHandlers( {x<-sqrt(-9);y<-matrix(1:9,ncol=4);z<-sqrt(4)} , warning = function (w) { lastWarning <<- paste(lastWarning,as.character(w))})"); //This will generate warning message[sqrt(-9)], another warning m...
2008 Jan 11
0
cairo and rapache [was: Weird errors on MAC OS X Leopard when using Cairo/GDD through Rserve]
...ll my > code that uses Rserve to produce pictures doesn t work anymore. I am > using the latest version of Rserve (0.5), I have tried the old and > the new java client. My R is 2.6.1. All libs (GDD, Cairo are the > latest as well) > > For example a simple : > connection.voidEval("library(GDD)"); > > produces a bunch of : > The process has forked and you cannot use this CoreFoundation > functionality safely. You MUST exec(). > Break on > __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__ > ()...
2002 Oct 21
1
Does SJava work on Windows? It does (ish) on Linux
...ava 0.65. With both Java 1.3.1 and Java 1.4.1 I get hotspot exception 11 whenever I try to invoke the Revaluator methods call and eval. If I trace the JNI calls I get an error about scalar data being passed to a function that is expecting an array (or perhaps it's vice versa). What does work is voidEval which is sufficient for our purposes, although SJava seems flaky in the stability department. Any help on getting SJava working on Windows is appreciated. Cheers, Peter -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tu...
2010 Feb 08
2
Error on start R in server
Hello all, (Thank for your reply) I have a web-application in Apache Tomcat, when i start R in this application, I used packe RSJava Code ROmegahatInterpreter interp; String [] rargs = {"--no-save"}; REvaluator e; interp = new ROmegahatInterpreter ( ROmegahatInterpreter.fixArgs(rargs),false ); e =new REvaluator (); Errors ================ R version 2.10.1 (2009-12-14)
2009 Jan 15
2
Interface to open source Reporting tools
...y can be done inside of R, and they work great. > > Rserve is running as root, and our Java application is running inside of > Tomcat, and is also running as root. > > The actual code looks something like: > > RConnection conn = new RConnection("127.0.0.1"); > conn.voidEval("library('randomForest')"); > conn.voidEval("train<-read.csv(\"" + (outfile.getAbsolutePath()) + > "\",header=FALSE)"); > conn.voidEval("x<-train[1:" + totalTrainData + ",1:11]"); > conn.voidEval("y<-as....