Hi, I am trying to have the target column passed to the “R learner” node be specified by a “value selection configuration” node. So I created the variable: “target (current value: octane)” and passed it to the “R learner” node.
If I do not use this variable, the following will work in the R script when I specify the target column:
Y = knime.in$“octane” (the column named “octane” is in the column list on the left)
The problem is I cannot figure out how to use the variable to specify this target column. I tried all the following:
Y = knime.in$knime.flow.in[[“target”]]
Y = paste0(“knime.in$”,knime.flow.in[[“target”]])
Y = cat(paste0(“knime.in$”,""",knime.flow.in[[“target”]],"""))
Ah, I think I understand you now. I believe this is what you want. I just used an intermediate temp variable to hold the value of the flow variable, but it ultimately returns a vector of values:
temp <- knime.flow.in[["target"]]
Y = knime.in[[temp]]