Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R-project integration (provides client to connect to remote Rserve server) #31

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

djun-kim
Copy link
Member

@djun-kim djun-kim commented Feb 7, 2013

This introduces a new macro library (macros/RserveClient.pl) and makes a few minor changes to Translator.pm (whitespace, spelling)

djun-kim and others added 18 commits November 29, 2012 08:58
* Use R to generate temporary file names on R server (using tempfile() function).

* Don't "use" Rserve::Connection; instead preload modules into Safe compartment using
  configuration in defaults.config.

* Move creation of image file into Rserve module (function evalStringToFile()).
Changes for integration with R statistics package (via Rserve)
@aubreyja
Copy link
Member

aubreyja commented Feb 8, 2013

Hi Djun,

This looks great! I tried this and ran into two small issues. After adding Statistics::RserveClient to $pg{modules} in defaults.config and trying the example in the documentation I first got an error message indicating that I needed Data::Dumper.

Can't locate object method "Dump" via package "Data::Dumper"

I think anything that is used in a pg module has to also be listed in $pg{modules}. So, I added Data::Dumper to $pg{modules}. This worked except that I got a warning message:

defined(@array) is deprecated at .../Statistics/RserveClient/Parser.pm line 766.

Starting with perl 5.16 defined(@array) is deprecated for testing if an array has elements.

Great work!

Jason

@djun-kim
Copy link
Member Author

djun-kim commented Feb 8, 2013

Hi Jason,

 Thanks for looking at this.

 Data::Dumper is used only for dumping debug messages; it's not really needed otherwise.  Perhaps I should remove all of those dependencies to another module which doesn't need to be there for production use.  Hmm….

Thanks for finding the issue with defined(). I was pleasantly surprised to find that at least one other person has downloaded the CPAN and used it, filed an issue and submitted a bug fix for this! I'll push his changes to CPAN, hopefully later today.

I'll put together a few additional examples and post them somewhere for people to try out.

Thanks again! Djun

On 2013-02-08, at 11:44 AM, Jason Aubrey wrote:

Hi Djun,

This looks great! I tried this and ran into two small issues. After adding Statistics::RserveClient to $pg{modules} in defaults.config and trying the example in the documentation I first got an error message indicating that I needed Data::Dumper.

Can't locate object method "Dump" via package "Data::Dumper"
I think anything that is used in a pg module has to also be listed in $pg{modules}. So, I added Data::Dumper to $pg{modules}. This worked except that I got a warning message:

defined(@array) is deprecated at .../Statistics/RserveClient/Parser.pm line 766.
Starting with perl 5.16 defined(@array) is deprecated for testing if an array has elements.

Great work!

Jason


Reply to this email directly or view it on GitHub..

@mgage
Copy link
Member

mgage commented Feb 19, 2013

Hi Djun,

Do you want me to pull this request? or wait until you make changes?

@jasongrout
Copy link

I'm really curious how this might be related to @aubreyja's work on the sage cell server plugin (which I'd love to start using :).

@djun-kim
Copy link
Member Author

Hi Jason (et al.)

 The two projects are very similar in approach.  @aubreyja's AskSage work is probably more general, in that Sage incorporates R, so anything my Rserve client can do, Sage can probably do as well.

 Here's what I like about my Rserve approach

   * requires only R (and the Rserve package) 
   * R can be installed on a local or remote server
   * Rserve is active, well-maintained, robust
   * speaks "pure R"
   * returns R results as perl data structures
   * easily handles binary data (e.g. for image generation)

Djun

On 2013-02-19, at 11:25 AM, Jason Grout wrote:

I'm really curious how this might be related to @aubreyja's work on the sage cell server plugin (which I'd love to start using :).


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants