in reply to Re: Calling R in Perl using RSPerl
in thread Calling R in Perl using RSPerl

Hi! Thank you for the suggestion. I have built R as a shared library and the following shows its location: /usr/lib64/R/lib/libR.so /usr/lib64/R/lib/libRblas.so /usr/lib64/R/lib/libRlapack.so What do you think I should do now?

Replies are listed 'Best First'.
Re^3: Calling R in Perl using RSPerl
by FreeBeerReekingMonk (Deacon) on Jan 10, 2016 at 23:08 UTC

    Add /usr/lib64/R/lib/ to your @INC with the code mentioned before. And also check where R.pm is in, add that path too. You can use multiple unshift commands in that BEGIN block. Outside the block, do a "use R;" and see if that runs without errors.

    BEGIN { unshift @INC, "/usr/lib64/R/lib/"; # unshift @INC, "/other/path/"; # if required }; use R;


    But maybe this works now (this is a use R; without any other code)
    use R;

      Thank you! That error is solved.

      Now I get another error:

      Undefined subroutine &R::startR called at ...

      The following is the part of the code the error is related to

      use R; &R::startR("--silent"); "X11" to simply pull up on screen R::call("pdf");