This module deals with representing an R expression as a Prolog term. The non-terminal r_expression//2 translates the Prolog term into a string that can be sent to R.
The design is inspired by real from Nicos Angelopoulos.
true
and false
are mapped to TRUE and FALSE.Left$Right
is translated as is.X[I,...]
is translated as is. Empty
elements in the index, e.g., the R expression a[,3]
can be written as `a['',3]`, `a[-,3] or
a[*,3]`.+, -, *, /, mod, '%%', ^,
>=, >, ==, <, <=, =<, \=, '!=', :, <-
Expr1,Expr2
is translated into two R statements separated
by a newline.
This library loads r_expand_dot.pl, which uses the `.` infix
operator to make a.b
and a.b()
valid syntax.