Problems with remote R Snippets

Dear KNIMErs,

I have a very strange problem with remote R Snippets in KNIME (using KNIME in windows and sending the work packages to Rserve running under Linux).

The following code works both in a local and in a remote R Snippet:


[1] "foo bar"

The following code works only in local R Snippets:


[1] "foo" "bar"

However, the remote Snippet returns (in Console):

ERROR R Snippet (Remote) Execute failed


Can anybody help me with this?

Many Thanks,


P.S.: I just tried using a local "remote" Rserve (starting Rserve() in a local R window in Windows after downloading the library). The results are the same as above, first example works, second example doesn't).

Hi! Sorry, I can't reproduce the problem, can you please change the console log level to DEBUG in the KNIME Preferences and send me the stack trace you get, when you execute the R Snippet (Remote) node. For me, both cases and scripts work fine; I am running KNIME 1.3.5 with R 2.5.0 and Rserve 2.4.0. Cheers, Thomas


thanks for the help.

Does this help you with my error?


DEBUG	 RConsoleModel	 voidEval: try(a<-"foo")
DEBUG	 RConsoleModel	 voidEval: try(b<-"bar")
DEBUG	 RConsoleModel	 voidEval: try(R<-c(a,b))
DEBUG	 RConsoleModel	 R: org.rosuda.REngine.REXPGenericVector@1af4abb[2] class org.rosuda.REngine.REXPGenericVector
ERROR	 R Snippet (Remote)	 Execute failed
DEBUG	 R Snippet (Remote)	 Execute failed
	at org.knime.ext.r.node.RConsoleModel.readList(
	at org.knime.ext.r.node.RConsoleModel.execute(
	at org.knime.core.node.NodeModel.executeModel(
	at org.knime.core.node.Node.execute(
	at org.knime.core.node.workflow.NodeContainer$
	at java.util.concurrent.Executors$
	at java.util.concurrent.FutureTask$Sync.innerRun(
	at org.knime.core.util.ThreadPool$
INFO 	 R Snippet (Remote)	 reset
DEBUG	 WorkflowEditor	 Workflow event triggered: WorkflowEvent [type=NodeConfigured;old=null;new=null;timestamp=Jul 7, 2008 3:42:51 PM]
DEBUG	 WorkflowRootEditPart	 WorkflowRoot: workflow changed, refreshing children/connections..
DEBUG	 WorkflowEditor	 Workflow event triggered: WorkflowEvent [type=NodeFinished;old=R Snippet (Remote)(#3);new=R Snippet (Remote)(#3);timestamp=Jul 7, 2008 3:42:51 PM]
DEBUG	 WorkflowRootEditPart	 WorkflowRoot: workflow changed, refreshing children/connections..
DEBUG	 WorkflowManager	 Workflow execution time: 172 ms

Did anyone come up with a solution for this? I am having the same problem, where a script works on local R but not in remote R.
Thanks, Liz

Hi Liz, Hi mixmaxx,
I am not able to reproduce this behavior using KNIME 2.1.2 together with R version 2.7.2 - I started Rserve() and the following script executes successfully:

resulting in on column with two rows containing “foo” and “bla”.

Cheers, Thomas

Hi Thomas,

I think I have worked out where the R Remote Server snippet is breaking. In the code below, R contains a table in the format . I am trying to split the list of numbers and get the log of the median for each row:

dataMatrix <- data.frame(R[1:10,])
dataMatrix$new <- as.vector(dataMatrix[,2])
for (i in 1:10)
dataMatrix[i,4] <- log(median(sapply(unlist(strsplit(dataMatrix[i,3],", ")), as.numeric)))
R <- dataMatrix[,c(1,4)]

This code runs fine in the local R snippet but fails in the remote R. When I comment out the loop then the code completes in remote R. Any ideas why the loop is making it fail?