search for: parseandev

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

Did you mean: parseandeval
2017 Oct 25
2
How to create a table structure in Java code?
...th "data.frame" (as below). Here's my latest attempt: String tableRead = "data.frame(5.1,3.5,1.4,0.2,setosa\n" + "4.9,3,1.4,0.2,setosa\n" + "4.7,3.2,1.3,0.2,setosa\n" + "4.6,3.1,1.5,0.2,setosa\n" + "5,3.6,1.4,0.2,setosa)" ; // using parseAndEval below to give me actual error R is sending... REXP rResponseObject = rConnection.parseAndEval("try(eval("+tableRead+"),silent=TRUE)"); if (rResponseObject.inherits("try-error")) { System.out.println("R Serve Eval Exception : "+rResponseObject.asString(...
2017 Oct 26
3
How to create a table structure in Java code?
...latest attempt: >> String tableRead = "data.frame(5.1,3.5,1.4,0.2,setosa\n" + >> "4.9,3,1.4,0.2,setosa\n" + >> "4.7,3.2,1.3,0.2,setosa\n" + >> "4.6,3.1,1.5,0.2,setosa\n" + >> "5,3.6,1.4,0.2,setosa)" ; >> // using parseAndEval below to give me actual error R is sending... >> REXP rResponseObject = rConnection.parseAndEval("try(eval("+tableRead+"),silent=TRUE)"); >> if (rResponseObject.inherits("try-error")) >> { >> System.out.println("R Serve Eval Exception : &...
2017 Oct 26
0
How to create a table structure in Java code?
...ere's my latest attempt: > > String tableRead = "data.frame(5.1,3.5,1.4,0.2,setosa\n" + > "4.9,3,1.4,0.2,setosa\n" + > "4.7,3.2,1.3,0.2,setosa\n" + > "4.6,3.1,1.5,0.2,setosa\n" + > "5,3.6,1.4,0.2,setosa)" ; > > // using parseAndEval below to give me actual error R is sending... > REXP rResponseObject = rConnection.parseAndEval("try(eval("+tableRead+"),silent=TRUE)"); > if (rResponseObject.inherits("try-error")) > { > System.out.println("R Serve Eval Exception : "+rRes...
2017 Oct 26
1
How to create a table structure in Java code?
...ad = "data.frame(5.1,3.5,1.4,0.2,setosa\n" + >>>> "4.9,3,1.4,0.2,setosa\n" + >>>> "4.7,3.2,1.3,0.2,setosa\n" + >>>> "4.6,3.1,1.5,0.2,setosa\n" + >>>> "5,3.6,1.4,0.2,setosa)" ; >>>> // using parseAndEval below to give me actual error R is sending... >>>> REXP rResponseObject = rConnection.parseAndEval("try(eval("+tableRead+"),silent=TRUE)"); >>>> if (rResponseObject.inherits("try-error")) >>>> { >>>> System.out.println(...
2017 Oct 26
0
How to create a table structure in Java code?
...;> String tableRead = "data.frame(5.1,3.5,1.4,0.2,setosa\n" + >>> "4.9,3,1.4,0.2,setosa\n" + >>> "4.7,3.2,1.3,0.2,setosa\n" + >>> "4.6,3.1,1.5,0.2,setosa\n" + >>> "5,3.6,1.4,0.2,setosa)" ; >>> // using parseAndEval below to give me actual error R is sending... >>> REXP rResponseObject = rConnection.parseAndEval("try(eval("+tableRead+"),silent=TRUE)"); >>> if (rResponseObject.inherits("try-error")) >>> { >>> System.out.println("R Serve Ev...
2014 Jul 21
0
Displaying database records returned from postgresql to R through Java
...ect(drv, host='local', port='1234',dbname='db', user='user', password='pwd') rs <- dbSendQuery(r,"select * from table1 where colm1 = 'val1'") temp <- fetch(rs,n=-1) return(temp) } My Java code is : c.parseAndEval("try(source(\"scpt.R\"),silent=TRUE)"); res = c.parseAndEval("try(fnct1(), silent=TRUE)"); System.out.println("table names are:"+ res); When I am printing res above it is displaying `table names are:org.rosuda.REngine.REXPGenericVector@681a9515+[...
2012 Jan 30
4
replacing characters in matrix. substitute, delayedAssign, huh?
A user question today has me stumped. Can you advise me, please? User wants a matrix that has some numbers, some variables, possibly even some function names. So that has to be a character matrix. Consider: > BM <- matrix("0.1", 5, 5) Use data.entry(BM) or similar to set some to more abstract values. > BM[3,1] <- "a" > BM[4,2] <- "b" >
2010 Apr 28
2
JRI API: sourcing from Java String
Hi all, I have been using 'source(filename)' to load R code from a file object. However, now I have a special case where I don't have a file since I am loading an R script from a Jar file. I would like to avoid creating temporary files. Is there a way to use the 'source' command with a Java String? Are there any other, better ways to do that? Ralf
2017 Oct 27
4
Cannot Compute Box's M (Three Days Trying...)
It can't be this hard, right? I really need a shove in the right direction here. Been spinning wheels for three days. Cannot get past the errors. I'm doing something wrong, obviously, since I can easily compute the Box's M right there in RStudio But I don't see what is wrong below with the coding equivalent. The entire code snippet is below. The code fails below on the call to