Forum: open-discussion
Monitor Forum | Start New ThreadRE: AND operator in RGG [ Reply ] By: Holger Brandl on 2011-05-04 07:14 | [forum:4368] |
Hi Amy, CDATA indicates region which might not be valid xml-code (which applies to common R-scripts). The reason for the missing bits in the generated scripts might be, that the original rgg contained some bugs, which have been addressed in a fork (because the original author stopped working on it), you can find it at https://github.com/knime-mpicbg/rgg Best, Holger |
RE: AND operator in RGG [ Reply ] By: Amy Stidworthy on 2011-05-03 09:58 | [forum:4362] |
Thanks Holger. I've tried that in my RGG script, but now the section of code inside the CDATA markers is just completely missed out from the RGG-generated R script. The same happens with your example code. Any idea what's going on? I understand that the CDATA marker is supposed to indicate character data that should not be validated by the RGGRunner javascript, but instead of just passing it through to the R script, RGGRunner seems to be removing it. Thanks for your help, Amy |
RE: AND operator in RGG [ Reply ] By: Holger Brandl on 2011-05-02 07:28 | [forum:4349] |
Hi Amy, make sure to put more elaborate part of your scripts into cdata sections. Here's an example <rgg> <!--1. Title and short description --> <separator label="Description" span="full"/> <labelarea span="full">$$$TEMPLATE_DESC$$$</labelarea> <gaprow height="1"/> <!-- 2. Configuration--> <separator label="Options" span="full"/> <gaprow height="2"/> # 1. Parameter selection <group> # 1) Define your numerical attribute of interest numVarName = <combobox items="$$$NUM_ATTRIBUTES$$$" label="Numerical attribute"/>; numVariable = kIn[, which(names(kIn)==numVarName)]; # 2) Define the label-column (factor) labelVariable = kIn$<combobox items="$$$STR_ATTRIBUTES$$$" label="Factor"/>; # (optional) title title=<textfield label="Title" var="plotTitle" data-type="text" default-value="" size="10" enabled="dfdf" span="full"/>; </group> <![CDATA[ #yAxisRange <- c( 0.0, 200.0) if(!exists("yAxisRange")) yAxisRange = NULL par(oma=c(8,1,1,1)); # the 3 defines the length of the labels, just increase it if necessary barplot(numVariable, ylab= numVarName, ylim = yAxisRange, names.arg = labelVariable, main= plotTitle, las = 2, col = c('lightblue')); ]]> </rgg> Best, Holger |
RE: AND operator in RGG [ Reply ] By: Amy Stidworthy on 2011-04-28 08:56 | [forum:4334] |
For example, the following line of R code in an RGG script causes the error: allmaxdata$event.mod.obs[allmaxdata$moderate.event.mod == 1 & allmaxdata$moderate.event.obs == 1] = 1 This works fine directly in R, but causes the java error in RGGRunner, |
RE: AND operator in RGG [ Reply ] By: Holger Brandl on 2011-04-28 07:33 | [forum:4315] |
Hi Amy, could you be more specific? Where do you want to use an AND operator? In a template? Best, Holger |
AND operator in RGG [ Reply ] By: Amy Stidworthy on 2011-04-27 22:34 | [forum:4306] |
What is the AND operator in RGG? The standard R operator '&' doesn't seem to work. RGG gives a java.lang.nullpointerexception error and won't load the RGG file. Thanks, Amy |