R to R node: Source of error for "for R evaluation failed"

Dear KNIME R community,

I am new to KNIME and am currently trying the R scripting nodes to build a model building and prediction workflow for soil IR spectroscopy. The current workflow consists of R nodes that pass along workspaces, as the spectral data are stored in R object lists together with other metadata and chemical informations. Therefore, I mostly use "R To R", "R Source (Workspace)", and "Add Table To R", because I need to access different R objects from the workspace.

The error message I get at the "R to R" node is the following:
ERROR R To R               0:36       Execute failed: R evaluation failed.

The "R to R node" that fails to evaluate uses functions from a personal R package with customized functions for soil spectroscopy. The code is shown below. However, when I try to evaluate the code in an R studio session everything works properly, and I get the desired output list. Also, when I evaluate the error node via "Configure..." > "Eval selection" I don't get any errors, meaning that all required R objects are available within the KNIME workspace.

# Perform pls modeling ------------------------------------------

# Total C
pls_C <- pls_ken_stone(
  spec_chem = soil_chemspec,
  ratio_val = 1/3,
  pc = 2,
  validation = TRUE,
  variable = C
)

I have installed Cairo and Rserve packages in R (version 3.3.1), and Rserve integration seems to work as the previous nodes can be executed properly. Currently, I'm using KNIME 3.1.2 with OS X 10.11.3.

From the error log file in KNIME I get only some hints, but I am not able to figure out why the error occurs.

I suspect that it might be a problem related to memory (maybe Rserve...), because the error log states
"'memory.limit()' is Windows-specific" . The R object generated within the node is a huge list of about 32 Mb, that contains soil chemical and spectral data, model output from the caret package, and a ggplot list object.

Note that the error occurs in node 36. I have increased buffer limit size to 1000MB for Rserve (configuration via KNIME setttings).

Has anybody of you have encountered similar errors? Thank you very much in advance for some possible hints why the error occurs and possible ways to fix it. Below is the error log.

Cheers, Philipp


2016-08-12 10:34:14,172 : DEBUG : main : NodeContainerEditPart :  :  : Add Table To R 0:35 (EXECUTED)
2016-08-12 10:34:14,172 : DEBUG : main : NodeContainerEditPart :  :  : R To R 0:36 (CONFIGURED)
2016-08-12 10:34:16,626 : DEBUG : R Error Reader : RBinUtil :  :  : External Rscript process error output: Warnmeldung:'memory.limit()' is Windows-specific
2016-08-12 10:34:16,626 : DEBUG : R Output Reader : RBinUtil :  :  : External Rscript process output:
2016-08-12 10:34:17,441 : DEBUG : R Error Reader (port:52499) : RController :  :  : Lade n"otiges Paket: RcppArmadillo
2016-08-12 10:34:17,694 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:34:17,694 : DEBUG : R Error Reader (port:52499) : RController :  :  : Attache Paket: 'dplyr'
2016-08-12 10:34:17,694 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:34:17,694 : DEBUG : R Error Reader (port:52499) : RController :  :  : The following objects are masked from 'package:stats':
2016-08-12 10:34:17,694 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:34:17,694 : DEBUG : R Error Reader (port:52499) : RController :  :  :     filter, lag
2016-08-12 10:34:17,695 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:34:17,696 : DEBUG : R Error Reader (port:52499) : RController :  :  : The following objects are masked from 'package:base':
2016-08-12 10:34:17,696 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:34:17,696 : DEBUG : R Error Reader (port:52499) : RController :  :  :     intersect, setdiff, setequal, union
2016-08-12 10:34:17,696 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:34:17,699 : DEBUG : R Error Reader (port:52499) : RController :  :  : Lade n"otiges Paket: ggplot2
2016-08-12 10:34:17,716 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:34:17,716 : DEBUG : R Error Reader (port:52499) : RController :  :  : Attache Paket: 'cowplot'
2016-08-12 10:34:17,716 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:34:17,716 : DEBUG : R Error Reader (port:52499) : RController :  :  : The following object is masked from 'package:ggplot2':
2016-08-12 10:34:17,716 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:34:17,716 : DEBUG : R Error Reader (port:52499) : RController :  :  :     ggsave
2016-08-12 10:34:17,716 : DEBUG : R Error Reader (port:52499) : RController :  :  :
2016-08-12 10:38:15,183 : DEBUG : main : NodeContainerEditPart :  :  : R To R 0:36 (CONFIGURED)
2016-08-12 10:38:15,183 : DEBUG : main : NodeContainerEditPart :  :  : Add Table To R 0:35 (EXECUTED)
2016-08-12 10:38:16,505 : DEBUG : main : NodeContainerEditPart :  :  : Add Table To R 0:35 (EXECUTED)
2016-08-12 10:38:16,505 : DEBUG : main : NodeContainerEditPart :  :  : R To R 0:36 (CONFIGURED)
2016-08-12 10:38:18,686 : DEBUG : R Error Reader : RBinUtil :  :  : External Rscript process error output: Warnmeldung:'memory.limit()' is Windows-specific

 

 

Hello everyone,

I too have been receiving the above error in my workflow while executing R snippet nodes. The node works without error sometimes and sometimes returns the error 'R evaluation failed' . I have been facing this issue since Knime 3.1.1

Hi Philipp!

First of all, thank you for the detailed description of the problem. Since it works in R Studio this is indeed probably a problem in KNIME.

I will send you an email to ask for the workflow.

Regards,

Jonathan.