R node does not properly pick up PATH environment variable


I’m using KNIME to process some data and to finally create a report from the processed data. My idea was to use the R package “pander” to collect the chapters and finally export everything with pandoc to HTML or PDF or so. This fails rather unexpectedly, because the R node does not find pandoc. Running R directly, it is found, though.

So I searched around a little bit, and found that the system path environment is clobbered in the KNIME node.

[1] “…\R-4.0.4;…\R-4.0.4\bin\x64\;null”

As you can see, the R home path is added at the head of the list. (I removed the actual path for privacy, but it is correct.) Also: this is on Windows. So backslashes and semicolons are correct as well.

The trailing “null” makes me think, that something goes wrong when starting up the R process. I also didn’t find a place, where to specify an environment variable and possibly override the value.

Is that a bug? Does someone know how to “reset” the environment variable from inside R, so that packages like pander pick up the changed setting?

Ah. The markdown messed up the slashes. Of course there are double backslashes there. It was eaten by Markdown and now I cannot edit the post anymore. The right output was like so:

[1] “…\\R-4.0.4;…\\R-4.0.4\\bin\\x64\\;null”