Topic: APLX Help : Help on APL language : System Methods : ⎕EVAL Evaluate external expression
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

⎕EVAL Evaluate external expression


Implemented (as a system method) for the R external class only.

Syntax:

    result ← objref.⎕EVAL string

The monadic ⎕EVAL system method allows an arbitrary expression to be evaluated in the external environment (currently R only). It is provided as a more convenient form of the system function of the same name. The object reference must be an R session object.

The right argument is a text vector containing the expression. The result is the explicit result (if any) of evaluating the expression in the external environment. For example:

      r←'r' ⎕new 'r'
      r.x←2 3⍴⍳6         ⍝ x is an R variable
      r.x
1 2 3
4 5 6

      r.⎕eval 'x[2,]'
4 5 6
      r.⎕eval 'mean(x[2,])'
5

Note that the last line could be executed using the alternative syntax:

      'r' ⎕eval 'mean(x[2,])'
5

Topic: APLX Help : Help on APL language : System Methods : ⎕EVAL Evaluate external expression
[ Previous | Next | Contents | Index | APL Home ]