Class RExpression2

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class RExpression2
    extends TypedAtomicActor
    The RExpression actor is an actor designed to run an R script or function with inputs and outputs determined by the ports created by the user. Port names will correspond to R object names. The RExpression actor is modeled after the Ptolemy expression actor, except that that instead of using a single mathematical expression in Ptolemy's expression language, it uses a set of the more powerful, higher order expressions available under R. Both input and output port will usually be added to the actor; The names of these ports correspond to R variables used in the R script.

    Note that RExpression2 uses the Java/R interface from https://rforge.net/JRI/ which requires that native libraries be installed in your java.library.path.

    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Dan Higgins and Matt Jones, NCEAS, UC Santa Barbara
    • Field Detail

      • log

        public static org.apache.commons.logging.Log log
        The log.
      • expression

        public StringAttribute expression
        The expression that is evaluated to produce the output.
      • Rcwd

        public StringParameter Rcwd
        The 'R' working directory (home dir by default).
      • showDebug

        public Parameter showDebug
        If true, then shoe debugging information about script. If false, then don't. (the default)
      • serializeData

        public Parameter serializeData
        If true, then daata frames (and other complexe data objects will be transferred by serialization to disk. If false, then they will be converted as losslessly as possible to a Ptolemy data structure
      • displayGraphicsOutput

        public Parameter displayGraphicsOutput
        If true, then display plot. If false, then don't. (the default)
      • graphicsFormat

        public StringParameter graphicsFormat
        The graphics output format. Currently the format is either a *.pdf or a *.png
      • graphicsOutput

        public Parameter graphicsOutput
        If true, then create a graphics output port. (the default); If false, then don't.
      • numXPixels

        public StringParameter numXPixels
        The width of the output graphics bitmap in pixels.
      • numYPixels

        public StringParameter numYPixels
        The height of the output graphics bitmap in pixels.
      • graphicsFileName

        public TypedIOPort graphicsFileName
        The name of the default graphics output file created by the actor.