Knime and R: don't communicate

Hi,

This is my first post on this forum, So I'm grateful to the team for Knime.
Very nice and operationnal.

The ideas to have bridges with others tools and to have the possiblity to write scripts (java, R, ...) are very important.

Concerning R: I have an error when R-nodes from Knime try to connect to the R-server (sorry it's in french):

Erreur dans NA <- c() : membre gauche de l'assignation (do_set) incorrect

Versions :
R: version 2.4.1 (2006-12-18 )
R-server: version 0.4-7

Many thanks for your help
Christo

I not sure if this is the same issue but that error message looks like it refers to NA values?

If that is right in the node description for "R Snippet" it says that mssing values are not supported yet.

I hope that helps.

cchristo wrote:

Erreur dans NA <- c() : membre gauche de l'assignation (do_set) incorrect

Thanks for this interesting comment. The problem here is just the invalid identifier on the left hand side. Because 'NA' is used for missing values in R, it can't be used as variable/identifier. Please use something else.

Jay wrote:

If that is right in the node description for "R Snippet" it says that mssing values are not supported yet.

Sorry for confusing you and thanks for this advise. KNIME supports missing values in R nodes since version 1.2.0 - this is a mistake inside the node description. For clarification, missing values of numeric columns are transfered as NaN (Not a Number) to the R server, whereas missing values of all other types of data (e.g. Strings) are handled as 'NA'.

I was way off on that one! :) I need to brush up on my french.

Thanks for letting me know. I am going to test out the R nodes a little more now.

Hello,
Thank you for your help.
I don't understand why "Not A Number" would appear since this error appear just at the first test of connection whith the server (login). So no data are sent (only necessary data to the login).

So ...

Hi,

I've been able to get both the R Snippet & R 2D Plot nodes working on Windows XP, R.2.4.0 and Rserve 0.4-3.

I have only been able to get two errors so far. One says “Execution failed: eval failed”.
The other error I have created is I when I purposely change the R on the left hand side of the <- in the Snippet node as was described. Is there anything in particular which you are doing that I may have missed to get to the point where you have an error? The only one I get when the server is down or I mess with the login info is “Execution failed: eval failed”.

I did notice that once I get one error that none of the R nodes seem to execute after that? Maybe that has to do with Rserve. I didn't try to recreate that yet. I’ve also had some issues with parrell execution and I did see in the Rserve documentation that on windows all connections use the same namespace. Could that be the cause of the error?

Thanks,

Jay

cchristo wrote:

I don't understand why "Not A Number" would appear since this error appear just at the first test of connection whith the server (login). So no data are sent (only necessary data to the login).

That's strange. I tried the R Snippet nodes and was not able to reproduce this behavior. I guess, there is something wrong within the dialog's tab "Execute" of this node. Can you please double check... Apart from that, the login does not create any statements such as "NA<-c()". If everything fails, you might consider to send me over your workflow and I will have a closer look.

Jay wrote:
I have only been able to get two errors so far. One says “Execution failed: eval failed”. The other error I have created is I when I purposely change the R on the left hand side of the <- in the Snippet node as was described. Is there anything in particular which you are doing that I may have missed to get to the point where you have an error? The only one I get when the server is down or I mess with the login info is “Execution failed: eval failed”.

Inside the R Snippet node you need to provide a variable "R" which will contain the result from the Rserve after execution. If you get the error message "eval failed" your R expression may be wrong. To double if your expression is correct, you could use the R Console node where you immediately see the result inside the node's view, or even more sophisticated - open the R-project GUI an execute your expression. Anyway, this error has nothing to do with the login.

Jay wrote:
I did notice that once I get one error that none of the R nodes seem to execute after that? Maybe that has to do with Rserve. I didn't try to recreate that yet. I’ve also had some issues with parrell execution and I did see in the Rserve documentation that on windows all connections use the same namespace. Could that be the cause of the error?

Absolutely! That can cause strange side effect, either the server hangs or the data is corrupted. In the first case you need to restart the Rserve.
Each R node transfers the data column-wise to the Rserve via the same connection. If you now have the same column names in both nodes, the Rserve gets confused and overrides the data. Please also see Rserve's FAQ http://www.rosuda.org/Rserve/faq.shtml#platform for more details. However, we are currently working on a work around which will still use the same connection, but will add an unique identifier (node ID or hash) to each data source.

Hi,

I'm sorry about my bad understanding of these R-nodes.
I thought that it was possible, with the "R-console" node, to send commands to the R server.
But it is not compeltly correct.

My aim was to ba able to use R functions like PCA (printcomp) and to get back data into knime.

But it seems that it is not possible ?
Christo

Hi,

Only the part you want returned has to be assigned to R so you can execute several steps before that. You could use these to shape the data output.

I hope that helps. If I misinterpreted let me know and I can help to test the issue out to find a solution.

Regards,

Jay

That's right, Jay. The R Snippet node can be used to send R commands to the server. The output of this node after execution, is the result within the variable "R". That's the trick to get the data back into KNIME for further processing. Currently we only support lists, vectors, arrays, or single elements (not matrices) - but matrices have high priority on my todo list.

http://goo.gl/3yO4Qn  
http://goo.gl/2xgUbu  
http://goo.gl/U6ZHNM
http://goo.gl/lvR4Rj
http://goo.gl/DOPLFd

he problem here is just the invalid identifier on the left hand side. Because 'NA' is used for missing values in R, it can't be used as variable/identifier. Please use something else.

 

easyfut coins

easy fut 15 coins