Hi Per,
The example you cite assumes the previous statements in the document have been evaluated:
engine.eval("library(e1071)");
engine.eval("data(iris)");
engine.eval("svmfit <- svm(Species~., data=iris)");
To get a list of variables defined in the global environment, you use the ls() function:
StringVector variables = (StringVector)engine.eval("ls()");
You can also access the global Environment object through Renjin's API:
RenjinScriptEngine renjinScriptEngine = (RenjinScriptEngine)engine;
Session session = renjinScriptEngine.getSession();
Environment global = session.getGlobalEnvironment();
Hope this helps,
Alex