We have been developing a number of R-scripts into the KNIEM r-script nodes. These workexcellently but are irritating to transfer bewteen projects (cut & paste etc).
Is there a way of developing knime nodes that contain R-scripts that can be distributed as other (Java) nodes?
Hi Al, Hi aborg,
What is the difference between copying meta nodes instead of the R Snippet node itself - do you see any advantage by going this way? I also currently don’t have any real solution for this, but what about using the settings object (XML) created by this node…? You can simply save and of course load it by selection File >> Load or Save inside the node’s dialog.
By saving and installing as a plugin later you are able to select it from the node repository, naturally with description, proper name. I guess it is more user friendly.
saving and installing an R-node as a plugin?
Can you explain a bit more how this should work?
Sure, you put your R-node to a meta node. Then you follow the idea described in this forum topic. You have to create a plugin/KNIME extension in eclipse, and put in the
plugin.xml the reference to the new meta node. (Do not forget to add it to the build.properties include part.) For details of eclipse plugin development I recommend the eclipse Help/Help Contents/Platform Plug-in Developer Guide > Programmer’s Guide > Simple plug-in example pages. You might take a look at this file at this this commit. Bests, gabor
I find it really hard to follow the steps which have to be done… In the topic you were linking to, it says:
In the new version, there is one more type of extension one can add --- the org.knime.workbench.repository.metanode, which creates a meta node automatically once added :)
If I go to “new” in the knime workbench, I only get the choice “Create a new Knime node extension”.
Beside that, I don’t know how to:
put in the plugin.xml the reference to the new meta node
How can a metanode be referenced? I only know so far how to create a simple metanode within a knime workflow (in the “user version”).
I try to go through the documentation but I still have some problems in understanding what is important at which place…
If it’s too much to explain here, just let me know… I would understand.
I have to admit it was a long time ago I did this, so if something is not correct please forgive me. (There is no direct option/wizard to create new metanode projects, that is why a bit hard to create one. Although I guess it is not so hard to create a wizard for this, but I am afraid it is not a priority.) Creating a new KNIME node extensions is a good choice to create a new eclipse plugin for KNIME. You can leave the code there, but I would recommend (although not necessary) to delete everything, except the activator class from the plugin, and also delete the
org.knime.workbench.repository.nodes extension. (If you open the
plugin.xml you can go the xml view, it is the last tab.) It is also possible to create a simple eclipse plugin, and in that case you do not have to delete things, and also . First, you have to find the metanode in your workplace (in the file system). It is a folder there. When you found just copy to the created plugin’s folder (in my example it was:
metaworkflows/, the name of the metanode was:
Cluster Columns). The reference term (in the reference the metanode context) was referring to the
workflowDir attribute of the
PersistedMetaNode elem in my opinion. One tricky part I remember was that the
category-path attribute of
PersistedMetaNode elem is relative to the Meta category, so you have to look for your node there. Oh, and one more tip: If you are not sure try <Ctrl>+[space] in various positions of
plugin.xml. For deploying the plugin you might find the KNIME help useful. (This one is for testing.) Hope this helps, good luck, gabor
A really ugly workaround is creating meta nodes around them, then saving it. Later you can use the metanode if you create a new meta node. The steps idea is described here: http://tech.knime.org/node/20451 (was: http://www.knime.org/node/451).