- r_eval(+Rserve, +Command, -Value) is det
- Send Command to Rserve and translate the resulting R expression
into a Prolog representation. The transformation from R
expressions to Prolog data is defined as follows:
- TRUE or FALSE
-
The R booleans are mapped to the Prolog atoms
true
and
false
.
- integer
-
R integers are mapped to Prolog integers.
- double
-
R doubles are mapped to Prolog floats.
- string
-
R strings are mapped to Prolog strings. The interface
assumes UTF-8 encoding for R. See the
encoding
setting in
the Rserve config file.
- See also
- - r_eval_ex/3 to map R exceptions to Prolog. By default, the
non-interactive R server terminates on an exception and thus if
r_eval/3 causes an R exception R terminates and Prolog receives
an I/O error.