gama-platform / gama.experimental

Home of experimental plugins for GAMA
13 stars 6 forks source link

[R] Loops throws error #30

Closed benoitgaudou closed 1 year ago

benoitgaudou commented 1 year ago

Describe the bug The R plugin throws an error when we try to execute a multiline R statement, such as a loop.

In R, when we have such a statement, we cannot execute it line by line. The for lines should be executed together.

s <- 0
for (i in c(1,2,3)) { 
  s <- s + i
}
i

To Reproduce Steps to reproduce the behavior:

  1. Add the previous code in the R script in GAMA to RJava / includes / rScript.txt.
  2. Launch 2. Eval a R script.gaml

Desktop (please complete the following information):