Is there a way to handle this in KNIME? I have an R script that was written by a collaborator that would produce several different plots for them when run through RStudio. However when I run it as an R snippet in KNIME I only see one of the plots. If I go in to the snippet and select “Eval Script”, eventually in workspace (on the right side) I see several items that should be plots. However they all seem to be displaying the same plot when I select “Show Plot”.
It seems that the obvious answer is probably to just split up the R code into multiple snippets so that each produces only the plots I need, but I was wondering if there is a way for one R snippet to produce multiple plots and have KNIME handle them correctly.
You could determine a local path and then tell R to save various graphics in a row. I attached an example workflow that does that. You might use that as a starter.
The R View shows one plot but saves more than one. I tried that with just a R scrip node but it gave me an error message.
You should split the R script. One part (preparation of all plots) will go into a R source or R to R node, the other parts (rendering each plot) into dedicated R view nodes, one for each plot.
One can also streamline such an approach using a loop and a list of plot names for the latter part in conjunction with image to cell.