|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--org.omegahat.Environment.Interpreter.BasicEvaluator
|
+--org.omegahat.Environment.Interpreter.UtilityEvaluator
|
+--org.omegahat.Environment.Interpreter.UserClassEvaluator
|
+--org.omegahat.Environment.Interpreter.InteractiveEvaluator
|
+--org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager
|
+--org.omegahat.R.Java.ROmegahatInterpreter
An Omegahat interpreter that also loads and initializes an embedded
R interpreter and that can optionally pass control to it to get the
usual R prompt.
This is used to bring R into a Java application.
One typically invokes this once simply to load and initialize the R session
and then create an instance of the REvaluator
class to call S functions and evaluate S expressions.
This class provides a run() method which causes this
Java thread to enter the R internal event loop, effectively running
R but from within a Java application. This is especially prudent
given the difficulties of matching and loading thread-safe libraries
when running Java within R.
| Fields inherited from class org.omegahat.Interfaces.NativeInterface.OmegaInterfaceManager |
anonymousDatabase, converterFactory, count, db, debug, PublicFlag |
| Fields inherited from class org.omegahat.Environment.Interpreter.InteractiveEvaluator |
continuation, continuationPrompt, interrupt, notify_listeners, pendingInput, promptExpression |
| Fields inherited from class org.omegahat.Environment.Interpreter.UserClassEvaluator |
classManager |
| Fields inherited from class org.omegahat.Environment.Interpreter.BasicEvaluator |
allowUnrestrictedAccess, class_lists, currentExpression, data, databases, debugger, DefaultAttachIndex, defaultDatabase, dynamicClassLoader, errorHandler, evaluationEvent, evaluationListeners, initialized, internalFunctionTables, internalPrimitiveClassNames, internalPrimitiveClassTable, lexer, localClasses, manager, options, output, parser, primitive_classes, primitiveClasses, PrimitiveClassNames, primitiveTypeNames, primitiveTypes, reversePrimitiveTypes, ShowMultipleClasses, sourceStack, stderr, stdout, SubEvaluationListeners, taskHistory, toplevelExpression, warningMessages |
| Fields inherited from interface org.omegahat.Environment.Interpreter.Evaluator |
ThisVariableName |
| Constructor Summary | |
ROmegahatInterpreter(java.lang.String[] args)
Basic constructor for this class which initializes R with the specified command line arguments and runs the R event loop. |
|
ROmegahatInterpreter(java.lang.String[] args,
boolean run)
Constructor that initializes R and optionally runs its event loop. |
|
| Method Summary | |
static java.lang.String[] |
fixArgs(java.lang.String[] args)
This takes the user's command line arguments and adds the equivalent of argv[0] (the name of the
application being invoked)
to them so that they can be passed to and correctly understood by the
R engine. |
boolean |
initR(java.lang.String[] args)
Native method that initializes the R engine and interpreter making it available for evaluating expressions. |
static void |
main(java.lang.String[] args)
The entry point for using this as a top-level, stand-alone application which simply runs R within Java, but getting the low-level C libraries loaded (more) correctly. |
boolean |
registerNativeConverters()
User-level (i.e. |
void |
run()
A native method that simply runs the R event loop, currently never returning from this call. |
| Methods inherited from class org.omegahat.Environment.Interpreter.InteractiveEvaluator |
currentExpression, deserialize, deserialize, deserialize, deserialize, deserialize, deserialize, evaluate, inputReady, inputReady, interrupt, notify_listeners, notify_listeners, notifyListeners, parserError, prompt, promptExpression, promptExpression, promptExpression, serialize, serialize, serialize, serialize |
| Methods inherited from class org.omegahat.Environment.Interpreter.UserClassEvaluator |
addMethod, classManager, classManager, createInstance, createInstance, createInstance, defineClass, defineClass, defineClass, defineClass, defineClass, defineClass, DefineUserClass, DefineUserClass, DefineUserClass, findUserClass, findUserClass, parseClass, parser |
| Methods inherited from class org.omegahat.Environment.Interpreter.UtilityEvaluator |
evaluator, exec, exec, findFile, getEvaluator, setProperty, setProperty |
| Methods inherited from class org.omegahat.Environment.Interpreter.BasicEvaluator |
addEvaluationListener, addFunctionTable, addFunctionTable, addSourceInput, addToHistory, allowUnrestrictedAccess, allowUnrestrictedAccess, asObject, asObject, asObject, asObjectName, asPrimitiveClass, assign, assign, assign, asWriter, attach, attach, attach, attach, attach, attach, attach, classInit, classLists, classLists, classPath, classPath, commandLine, convertPrimitive, copy, copy, copyByConstructor, copyBySerialization, createClassLists, currentExpression, data, data, database, database, Debug, Debug, Debug, Debug, Debug, debugger, debugger, defaultDatabase, defaultDatabase, defaultDatabase, defaultErrorHandler, detach, detach, displayTask, displayWarnings, displayWarnings, dynamicClassLoader, dynamicClassLoader, endSource, endSource, endSource, endTaskEvaluation, error, error, errorHandler, errorHandler, evaluate, evaluate, evaluate, evaluationError, evaluationListeners, evaluationListeners, evaluationListeners, exists, exit, exit, expandClassName, expandedClassPathElement, find, findAsField, findClass, findClass, findClass, findClass, findFunction, findFunctionOrMethod, functionTableList, get, get, get, get, get, get, get, get, get, getBaseURL, getEvaluationEvent, getEvaluationListeners, getField, getSubEvaluationListeners, help, Import, Import, Import, init, initialize, initTaskEvaluation, internalFunctionTables, isPrimitive, isPrimitive, javaVersion, lexer, lexer, lexer, localClasses, localClasses, manager, manager, newDatabase, newDatabase, notifyListeners, objects, objects, objects, options, options, output, output, output, parse, parse, parse, parse, primitiveClass, q, q, remove, removeFunctionTable, same, searchForClass, searchPath, searchPath, searchPath, searchPath, setEvaluationEvent, setEvaluationListeners, setSubEvaluationListeners, show, show, show, source, source, source, source, source, source, source, source, source, sourceStack, stderr, stderr, stdout, stdout, taskHistory, taskHistory, toplevelExpression, toplevelExpression, useLazyEvaluation, warning, warning, warning, warnings, warnings, where, which, which |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ROmegahatInterpreter(java.lang.String[] args)
public ROmegahatInterpreter(java.lang.String[] args,
boolean run)
| Method Detail |
public static void main(java.lang.String[] args)
public boolean initR(java.lang.String[] args)
public boolean registerNativeConverters()
public void run()
run in interface java.lang.Runnablerun in class org.omegahat.Environment.Interpreter.BasicEvaluatorpublic static java.lang.String[] fixArgs(java.lang.String[] args)
argv[0] (the name of the
application being invoked)
to them so that they can be passed to and correctly understood by the
R engine.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||