/swish/pack/rserve_client/prolog/r/r_serve.pl
All Application Manual Name SummaryHelp

  • prolog
    • r
      • r_call.pl -- R plugin for SWISH
      • r_serve.pl -- SWI-Prolog Rserve client
        • r_open/2
        • r_close/1
        • r_login/3
        • r_assign/3
        • r_eval/3
        • r_eval_ex/3
        • r_eval/2
        • r_read_file/3
        • r_remove_file/2
        • r_open_hook/2
        • r_detach/2
        • r_resume/2
        • r_resume/3
        • r_server_eval/2
        • r_server_source/2
        • r_server_shutdown/1
      • r_grammar.pl -- R parser primitives
      • r_term.pl -- Translate a Prolog term into an R expression
      • r_expand_dot.pl
      • r_data.pl -- R data frame handling
      • r_sandbox.pl -- Declare the R API safe
 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.