Displaying 20 results from an estimated 3000 matches similar to: "Handling warning messages"
2005 Aug 22
1
Fetching Warning Messages
Hi,
I am facing one problem of fetching R warning messages in Java Code
using Rserve. It is easier to trap R Error messages by using catching
RSrvException. I came to know one way of fetching R Warning messages, i.e.
using "withCallingHandlers", below is my Java Program, which uses
withCallingHandlers of R :
import org.rosuda.JRclient.*;
2017 Oct 25
2
How to create a table structure in Java code?
Hi all,
Using RConsole, it's easy to get data from the database that you can use in an R Command. Like this:
(Reference case)
irisQuery <- dbGetQuery(conn, "select * from iris")
boxM(irisQuery [,-5], irisQuery[,5])
----
(Actual case this posting is about)
Yet, if I'm getting that same (sample IRIS) data, say, in a web service possibly POSTED from a SQL command, that same
2006 Sep 05
1
Reserve and biobase
Hi
I am using Rserve for R2.3.1.
every time after I load Biobase library, a new Graphics window frame pops up. Could any onw know how can avoid it.
Best
Saeede
class testReserve {
public static void main(String[] args) {
RServeConnection rsCon = null;
Rconnection c = null;
Process proc = null;
try {
Runtime rt = Runtime.getRuntime();
proc
2017 Oct 26
3
How to create a table structure in Java code?
That's amazing! Thank you!!!
One follow up question, if that's OK?
If, instead of using hard-coded CSV, I read the CSV into a variable first, then it fails again with a parse error.
Code below.
So, if I read the CSV into a variable, do I need an additional wrapper method?
Seems like it should still work.
Thanks in advance for your reply.
-M
String inputIris =
2005 Dec 01
1
Transfer String Array from R to java
I have a data frame which has the following data.
data<-read.table("table.txt",header=TRUE)
data
X14A_U133A_StatPairs X14A_U133A_Detection X14B_U133A_Signal
1 AFFX-BioB-5_at 403.0 409.3
2 AFFX-BioB-M_at 757.3 574.4
3 AFFX-BioB-3_at 284.4 327.3
4 AFFX-BioC-5_at
2009 Jun 12
0
JRclient.RSrvException Exception: Handshake
Hi all,
first of all: Sorry for my bad englis, and now the Question:
I have some problems with running R from Java. First i tried using rJava (JRI). But the examples didnt work properly.
Now im trying to establish a connection by using Rserve and JRclient (RF503).
I have the following code, which i`ve found:
------------------------------------------------------------------------
public
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
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");
...
2011 Mar 09
0
java+R+serverEval failed+request status: control pipe to master process is closed/broken
hi:
when I run the example program on windows XP+NetBeans:
Rserve_0.6-3\Rserve\src\client\javanew\Rserve\test\test.java
{ // test control commands (works only when enabled and in Rserve 0.6-0 and higher only) - must be the last test since it closes the connection and shuts down the server
System.out.println("* Test control commands (this will fail if control commands are disabled)
2017 Oct 26
0
How to create a table structure in Java code?
I suspect that you are looking for something like:
read.csv(textConnection(
"5.1,3.5,1.4,0.2,setosa
4.9,3,1.4,0.2,setosa
4.7,3.2,1.3,0.2,setosa
4.6,3.1,1.5,0.2,setosa
5,3.6,1.4,0.2,setosa"
), header = FALSE)
HTH,
Jan
On 25-10-17 12:50, Morkus via R-devel wrote:
> Hi all,
>
> Using RConsole, it's easy to get data from the database that you can use in an R Command. Like
2005 Oct 05
2
R and Java
I am a grad student and am working on a project where i need to integrate
java and R. I have a front end in java and i need to call R functions and be
able to dispaly the plots and graphs produced by R on my java front end. I
came across some tools like SJava and rserve...but am not sure which best
suits my application. Your suggestion will be really helpful.
Thanks,
vasu.
[[alternative HTML
2017 Oct 26
0
How to create a table structure in Java code?
You are entering the quoting hell - you are missing quotes and escapes for \n. it would be much more reasonable to use the rConnection.assign method instead of pasting any content through the parser.
Cheers,
Simon
> On Oct 26, 2017, at 9:59 AM, Morkus via R-devel <r-devel at r-project.org> wrote:
>
> That's amazing! Thank you!!!
>
> One follow up question, if
2010 Aug 20
1
Rserve (Anyone?)
REXP has an asBytes() method. Will this capture the output of an R plot
function if a proper graphics device is used? It appears R insists on
sending plot output to a file. Kind of strange since it insists on loading
all your data into memory before it can do anything.
If so then does anyone know what this would be? I prefer png or jpeg.
Example:
c is an RConnection
REXP r =
2017 Oct 26
1
How to create a table structure in Java code?
Thanks! I just figured it out (thanks to "Beyond Compare") and was coming here to post back.
The boxM test doesn't work with that (now, finally working) REXP structure, but I probably now need to create a table or something and parse that structure.
So much fun! :)
Thanks again.
- M
Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email.
> --------
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
I'm not sure what you mean. Could you please be more specific?
If I print the string, I get: boxM(boxMVariable[, -5], boxMVariable[, 5])
From this code:
.
.
.
// assign the data to a variable.rConnection.assign("boxMVariable", myDf);
// create a string command with that variable name.String boxVariable = "boxM(boxMVariable[, -5], boxMVariable[, 5])";
2017 Oct 27
0
Cannot Compute Box's M (Three Days Trying...)
Does it work if you supply the closing parenthesis on the call to boxM?
The parser says the input is incomplete and a missing closing parenthesis
would cause that error..
// create a string command with that variable name.String boxVariable =
"boxM(boxMVariable [,-5], boxMVariable[,5]";
// try to execute the command...
// FAILS with org.rosuda.REngine.Rserve.RserveException: eval
2017 Oct 28
2
Cannot Compute Box's M (Three Days Trying...)
Thanks Duncan. Awesome ideas!
I think we're getting closer!
I tried what you suggested and got a possibly better error...
.
.
.
rConnection.assign("boxMVariable", myDf);
String resultBV = "str(boxMVariable)"; // your suggestion.
RESULTING ERROR:
Error in format.default(nam.ob, width = max(ncn), justify = "left") : invalid 'width' argument
(No idea
2010 Jun 09
1
[R-sig-Geo] How to extract coordinates values from a shapefile?
I'm not sure if this is what you want. But the function coordinates() in sp
package gives you the coordinates of SpatialObjects.
Regards.
Rodrigo.
2010/6/9 Nikhil Kaza <nikhil.list@gmail.com>
> You need to execute gpclibPermit() to enable gpclib.
>
> library(maptools) should have issued a warning to that effect.
>
>
> Nikhil Kaza
> Asst. Professor,
> City and
2007 Dec 30
1
some questions about startup Rserve
I realize the communication between R and Java with Rserve in my
dissertation, but i can not run the Rserve by double click of Rserve.exe,
and also i can't realize backstage running of Rserve by technique of
Multi-thread in Java. Can anyone tell me why?
So, before i run the Java, i must run the R manually, then input
"Rserve()" or "system("Rserve")". This
2017 Oct 27
0
Cannot Compute Box's M (Three Days Trying...)
Just print the string you are asking to R to evaluate. It doesn't make
any sense as an R expression. Fix that, and things will work.
Duncan Murdoch
On 27/10/2017 3:41 PM, Morkus via R-devel wrote:
> 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