WeBWorK Main Forum

Settings for R in 2.13 localOverrides.conf

Settings for R in 2.13 localOverrides.conf

by Andras Balogh -
Number of replies: 4
Just updated to 2.13 on Red Hat Enterprise Linux Server release 6.9
R works only if I add back the following lines to the new localoverrides.conf file:

push @{$pg{modules}},
[qw( Statistics::R::IO::Rserve )],
[qw( Statistics::R::IO::ParserState )],
[qw( Statistics::R::REXP::Character )],
[qw( Statistics::R::REXP::Double )],
[qw( Statistics::R::REXP::Environment )],
[qw( Statistics::R::REXP::GlobalEnvironment )],
[qw( Statistics::R::REXP::Integer )],
[qw( Statistics::R::REXP::Language )],
[qw( Statistics::R::REXP::List )],
[qw( Statistics::R::REXP::Logical )],
[qw( Statistics::R::REXP::Null )],
[qw( Statistics::R::REXP::Raw )],
[qw( Statistics::R::REXP::Symbol )],
[qw( Statistics::R::REXP::Unknown )],
[qw( Statistics::R::REXP::Vector )],
[qw( Statistics::R::REXP )],
[qw( IO::File )],
[qw( IO::Handle )],
[qw( Moose )],
[qw( Class::MOP )];

Without those lines I am getting error messages like the following

  • Can't locate package Moose::Object for @Statistics::R::IO::Rserve::ISA at constructor Statistics::R::IO::Rserve::new (defined at /usr/local/share/perl5/Statistics/R/IO/Rserve.pm line 357) line 9
I don't understand why these lines are missing from the new localOverrides.conf file. Could somebody explain it to me? Or maybe they should not be there but I am doing something wrong?

Andras
In reply to Andras Balogh

Re: Settings for R in 2.13 localOverrides.conf

by Danny Glin -
Did you update pg as well?

Between 2.12 and 2.13 the way that R macros are loaded changed in order to provide more meaningful errors, and so that WW failed gracefully on R-dependent problems if the R server wasn't available.

Make sure pg is up to date, and remove any old copies of RserveClient.pl, leaving only the one in pg/macros.
In reply to Danny Glin

Re: Settings for R in 2.13 localOverrides.conf

by Andras Balogh -
I do have an updated pg, and the only additional copy of RserveClient.pl is in the directory OpenProblemLibrary/macros/UBC.

I did find at least that the source of the additional lines in localOverrides.conf is from the wikipage at
http://wiki.ubc.ca/Documentation:WeBWork/The_WeBWorKiR_Project:_Integrating_WeBWorK_with_R/Installation_guide



In reply to Andras Balogh

Re: Settings for R in 2.13 localOverrides.conf

by Danny Glin -
Those extra lines in localOverrides.conf were from a previous implementation of R in WeBWorK. They shouldn't be required using the current approach described in http://webwork.maa.org/wiki/R_in_WeBWorK. It used to be that those packages were loaded within a problem. Now they are loaded at the pg level, so they don't need to be explicitly allowed from within a problem.

It looks like WW can't find the Moose::Object package. Try running check_modules.pl again to see if anything is missing.
In reply to Danny Glin

Re: Settings for R in 2.13 localOverrides.conf

by Andras Balogh -
check_modules.pl claims that everything is fine.

The old method: perl -MMoose::Object -e 'print "installed!\n"' also shows that the Moose::Object package is installed.

Actually this seems to be the only package that requires explicit loading through localOverrides.conf using the lines
push @{$pg{modules}},
[qw( Moose )];

Tried several R-statistics problems, and all of them have the same warnings without these lines.