rsruby 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
data/ext/robj.c CHANGED
@@ -167,3 +167,4 @@ VALUE RObj_to_ruby(VALUE self, VALUE args){
167
167
 
168
168
  }
169
169
 
170
+
data/ext/rsruby.c CHANGED
@@ -113,7 +113,9 @@ void r_finalize(void)
113
113
  R_gc(); /* Remove any remaining R objects from memory */
114
114
  }
115
115
 
116
- //TODO - Shutdown is not working correctly
116
+ /*
117
+ * Shutdown the R interpreter
118
+ */
117
119
  VALUE cShutdown(VALUE self){
118
120
 
119
121
  r_finalize();
data/lib/rsruby/robj.rb CHANGED
@@ -32,6 +32,10 @@ class RObj
32
32
 
33
33
  attr_accessor :conversion, :wrap
34
34
 
35
+ def as_r
36
+ self
37
+ end
38
+
35
39
  #Attempts to call the RObj with the arguments given. Returns the result
36
40
  #of calling the R object. Only use this method if the RObj represents an
37
41
  #R function.
data/test/table.txt CHANGED
@@ -1,4 +1,4 @@
1
1
  A B C D
2
2
  'X1' 4.0 5 '6'
3
3
  'X2' 7.0 8 '9'
4
- 'X3' 6.0 2 'Foo'
4
+ 'X3' 6.0 2 'Foo'
@@ -13,6 +13,7 @@ class TestNewCases < Test::Unit::TestCase
13
13
  f = r.c(1,2,3)
14
14
  assert_equal('[1] 1 2 3',f.to_s)
15
15
  assert_equal([1,2,3],f.to_ruby)
16
+ assert_instance_of(RObj,f.as_r)
16
17
 
17
18
  end
18
19
 
metadata CHANGED
@@ -3,12 +3,12 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: rsruby
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.3
7
- date: 2007-02-21 00:00:00 +09:00
6
+ version: 0.4.4
7
+ date: 2007-02-22 00:00:00 +09:00
8
8
  summary: RSRuby is a bridge library for Ruby giving Ruby developers access to the full R statistical programming environment. RSRuby embeds a full R interpreter inside the running Ruby script, allowing R methods to be called and data passed between the Ruby script and the R interpreter. Most data conversion is handled automatically, but user-definable conversion routines can also be written to handle any R or Ruby class.
9
9
  require_paths:
10
10
  - lib
11
- - ext
11
+ - test
12
12
  email: alexg@kuicr.kyoto-u.ac.jp
13
13
  homepage: http://web.kuicr.kyoto-u.ac.jp/~alexg/rsruby/
14
14
  rubyforge_project: rsruby