Problem with rserve_client

I’m using: SWI-Prolog version 8.1.21-26-g3ffc1abe6

I want the code to: Do a simple R calculation

But what I’m getting is: R I/O Error

My code looks like this:

:- use_module(library(r/r_call)).

% This fails the 1st time. 2nd time, it works.
fails :-
    A <- 1,

% This is working from the beginning.
works :-
    x <- 1,
    A <- 1,

Dear Jan, dear list,

I have a strange behavior with rserve_client on my computer (Linux). First I start Rserve() from within R, everything good. Then I run swipl, consult the above program, and then I have two choices:

  • fails. ends with an R I/O error. If I invoke it a second time, it works fine and prints “[1]” on the screen.
  • works. works fine from the beginning.

I can also invoke works. first and fails. second; in that case, both are running smoothly.

Unfortunately, I can provide only this bug report, without any further hints to a solution. If I start Rserve(debug=TRUE) from within R, I just get the screen filled with dump.

Best regards,