R node needs always input? What about Open File Dialogs?

Hi there,

I played a little bit with the R node “snippet”. Is it true, that it always needs an input? I was thinking about loading data from R into Knime but then I would have to create a Dummy-Input, no?

And another question: I tried to call “guiDlgOpen” (library(svDialogs) ) - to create a standard open file dialog. I works but the dialog is just appearing in the background - means, I have to minimize Knime, select my file, and maximize again. Any solution to this?

Ciao,
Antje

Hi Antje,
Yes, the R Snippet node always needs an input to perform the operation on. In the future we are planning to have an R Import and Export node to allow import/export between R and KNIME. To import data from R, I would recommend to directly generate a data frame without any file browser dialog which is created by R. For all other table-formatted datasets, you should be able to use our standard File Reader node to get this data into KNIME.
Cheers, Thomas

Hi Thomas,

thanks a lot for your answer.
I tried to find a convenient way to select multiple files to read. Additionally, these files are special in that way, that one column does only contain an entry for the first subset of the data.
That’s why, I need to read them with R.
I guess, the best way would be to generate a file with the filenames, read this with the standard file reader and pass it entry by entry as input to the R snippet…

Ciao,
Antje

Hi Antje,
Thanks for this helpful comments. KNIME 2.0 supports variables and loops which invisibly flow through the pipeline. For more details how to enable these features see http://knime.org/documentation/faq#q5 . After you have then restarted KNIME, you will find a number of new nodes in the Loop Support and Meta category. There you also find a node called Iterate List of Files which uses a set of input files names, reads each of them into KNIME, and concatenates them at the end of the loop. Give it a try!
Ciao,
Thomas

Hi Thomas,

thanks a lot for the hints. Is there any information available on how to use these loop nodes?

Ciao,
Antje