0

For some reason I can't run a script using RunRFile so the next best thing was to type all my code as RRun requests. However I couldn't figure out how to loop.

user1627466
  • 411
  • 5
  • 14

1 Answers1

0

All you need is to separate the statements using ;

rinterface.RRun "test = rep(0,5)" rinterface.RRun "for (i in 1:5) { k <- i+30 test[i] <- k + 5}"

will not work

rinterface.RRun "test = rep(0,5)" rinterface.RRun "for (i in 1:5) { k <- i+30; test[i] <- k + 5}"

will

The support for Rexcel is scarce unless you join a mailing list, so I'm answering my own questions as I solve them.

user1627466
  • 411
  • 5
  • 14