Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

import Statistics-R 0.03 from CPAN

git-cpan-module:   Statistics-R
git-cpan-version:  0.03
git-cpan-authorid: CTBROWN
git-cpan-file:     authors/id/C/CT/CTBROWN/Statistics-R-0.03.tar.gz
  • Loading branch information...
commit 0bf3e4ed93bd308727ccd19cfca3855523ccd1a1 1 parent bb1195a
authored schwern committed
10  Changes
... ...
@@ -1,5 +1,15 @@
1 1
 Revision history for Perl extension Statistics::R.
2 2
 
  3
+0.03  2008-08-16
  4
+      - Fixed RT Bug #23948: bug in Statistics::R 
  5
+      - Fixed --gui
  6
+        - RT Bug #17925: R --slave --vanilla --gui=none is now R --slave --vanilla --gui=X11
  7
+        - RT Bug #20515: Fwd: Delivery Status Notification (Failure)
  8
+        - RT Bug #14324: error message with recent versions of R
  9
+      We used the patch from barry.moore since it correctly identifies that we probably 
  10
+      don't want the GUI.  
  11
+      - Fixed RT Bug #17956: Win32: log_dir is not in tmp_dir by default as advertised
  12
+
3 13
 0.02  2004-02-23
4 14
       - Just minor changes and POD fix.
5 15
 
1  MANIFEST
@@ -10,3 +10,4 @@ lib/Statistics/R/Bridge/pipe.pm
10 10
 script/statistics-r.pl
11 11
 script/test-shared.pl
12 12
 test.pl
  13
+META.yml                                 Module meta-data (added by MakeMaker)
13  META.yml
... ...
@@ -0,0 +1,13 @@
  1
+--- #YAML:1.0
  2
+name:                Statistics-R
  3
+version:             0.03
  4
+abstract:            Controls the R (R-project) interpreter through Perl.
  5
+license:             ~
  6
+author:              
  7
+    - Graciliano M. P. <gm@virtuasites.com.br>
  8
+generated_by:        ExtUtils::MakeMaker version 6.44
  9
+distribution_type:   module
  10
+requires:     
  11
+meta-spec:
  12
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
  13
+    version: 1.3
3  lib/Statistics/R.pm
@@ -45,7 +45,7 @@
45 45
   
46 46
   use vars qw($VERSION) ;
47 47
   
48  
-  $VERSION = 0.02 ;
  48
+  $VERSION = 0.03 ;
49 49
   
50 50
   my @ERROR ;
51 51
   
@@ -77,6 +77,7 @@
77 77
   }
78 78
 
79 79
   sub startR { my $CLASS_HPLOO ;$CLASS_HPLOO = $this if defined $this ;my $this = UNIVERSAL::isa($_[0],'UNIVERSAL') ? shift : $CLASS_HPLOO ;my $class = ref($this) || __PACKAGE__ ;$CLASS_HPLOO = undef ; $this->{BRIDGE}->start ;}
  80
+
80 81
   sub start_sharedR { my $CLASS_HPLOO ;$CLASS_HPLOO = $this if defined $this ;my $this = UNIVERSAL::isa($_[0],'UNIVERSAL') ? shift : $CLASS_HPLOO ;my $class = ref($this) || __PACKAGE__ ;$CLASS_HPLOO = undef ; $this->{BRIDGE}->start_shared ;}
81 82
   sub stopR { my $CLASS_HPLOO ;$CLASS_HPLOO = $this if defined $this ;my $this = UNIVERSAL::isa($_[0],'UNIVERSAL') ? shift : $CLASS_HPLOO ;my $class = ref($this) || __PACKAGE__ ;$CLASS_HPLOO = undef ; $this->{BRIDGE}->stop ;}
82 83
   sub restartR { my $CLASS_HPLOO ;$CLASS_HPLOO = $this if defined $this ;my $this = UNIVERSAL::isa($_[0],'UNIVERSAL') ? shift : $CLASS_HPLOO ;my $class = ref($this) || __PACKAGE__ ;$CLASS_HPLOO = undef ; $this->{BRIDGE}->restart ;}
13  lib/Statistics/R/Bridge/Linux.pm
@@ -47,7 +47,7 @@
47 47
 
48 48
   use vars qw($VERSION) ;
49 49
   
50  
-  $VERSION = 0.01 ;
  50
+  $VERSION = 0.02 ;
51 51
   
52 52
   sub Linux { 
53 53
     my $CLASS_HPLOO ;
@@ -58,13 +58,16 @@
58 58
     my %args = @_ ;
59 59
     @_ = () ;
60 60
     
61  
-    $this->{R_BIN} = $args{r_bin} || $args{R_bin} ;
62  
-    $this->{R_DIR} = $args{r_dir} || $args{R_dir} ;
  61
+    $this->{R_BIN}   = $args{r_bin} || $args{R_bin} ;
  62
+    $this->{R_DIR}   = $args{r_dir} || $args{R_dir} ;
63 63
     $this->{TMP_DIR} = $args{tmp_dir} ;
64 64
     
65 65
     if ( !-s $this->{R_BIN} ) {
66 66
       my @files = qw(R R-project Rproject) ;
67  
-      my @path = (split(";" , $ENV{PATH} || $ENV{Path} || $ENV{path} ) , '/usr/lib/R/bin' , '/usr/lib/R/bin' ) ;
  67
+      ## my @path = (split(":" , $ENV{PATH} || $ENV{Path} || $ENV{path} ) , '/usr/lib/R/bin' , '/usr/lib/R/bin' ) ;
  68
+    # CHANGE MADE BY CTBROWN 2008-06-16
  69
+    # RESPONSE TO RT BUG#23948: bug in Statistics::R
  70
+      my @path = (split(":" , $ENV{PATH} || $ENV{Path} || $ENV{path} ) , '/usr/lib/R/bin' ) ;
68 71
       
69 72
       my $bin ;
70 73
       while( !$bin && @files ) {
@@ -95,7 +98,7 @@
95 98
     if ( !-s $this->{R_BIN} ) { $this->error("Can'find R binary!") ; return UNDEF ;}
96 99
     if ( !-d $this->{R_DIR} ) { $this->error("Can'find R directory!") ; return UNDEF ;}
97 100
     
98  
-    $this->{START_CMD} = "$this->{R_BIN} --slave --vanilla --gui=none" ;
  101
+    $this->{START_CMD} = "$this->{R_BIN} --slave --vanilla " ;
99 102
     
100 103
     if ( !$args{log_dir} ) { $args{log_dir} = "$this->{TMP_DIR}/Statistics-R" ;}
101 104
     
4  lib/Statistics/R/Bridge/Win32.pm
@@ -111,7 +111,9 @@
111 111
     $this->{START_CMD} = "$exec --slave --vanilla" ;
112 112
     
113 113
     if ( !$args{log_dir} ) {
114  
-      $args{log_dir} = "$this->{R_DIR}/Statistics-R" ;
  114
+      # $args{log_dir} = "$this->{R_DIR}/Statistics-R" ;
  115
+    # Bug Fix by CTB:  Reponse to RT Bug #17956: Win32: log_dir is not in tmp_dir by default as advertised    
  116
+      $args{log_dir} = "$this->{TMP_DIR}/Statistics-R" ;
115 117
       $args{log_dir} =~ s/\\+/\//gs ;
116 118
     }
117 119
     
5  test.pl
@@ -16,8 +16,8 @@
16 16
   my $R = Statistics::R->new() ;
17 17
   ok($R) ;
18 18
   
19  
-  #use Data::Dumper ; print Dumper( $R ) ; exit ;
20  
-
  19
+  # use Data::Dumper ; print Dumper( $R ) ; exit ;
  20
+  
21 21
   ok( $R->startR ) ;
22 22
   
23 23
   ok( $R->Rbin ) ;
@@ -31,6 +31,7 @@
31 31
   ok( $R->send(qq`x = 123 \n print(x)`) ) ;
32 32
   
33 33
   my $ret = $R->read ;
  34
+  
34 35
   ok( $ret =~ /^\[\d+\]\s+123\s*$/ ) ;  
35 36
   
36 37
   ok( $R->send(qq`x = 456 \n print(x)`) ) ;

0 notes on commit 0bf3e4e

Please sign in to comment.
Something went wrong with that request. Please try again.