Class: Rserve::REXP::Function

Inherits:
Rserve::REXP show all
Defined in:
lib/rserve/rexp/function.rb

Overview

represents a Function in R

Constant Summary

Constants inherited from Rserve::REXP

MaxDebugItems, MismatchError

Instance Attribute Summary collapse

Attributes inherited from Rserve::REXP

#attr

Instance Method Summary collapse

Methods inherited from Rserve::REXP

#as_bytes, #as_double, #as_double_matrix, #as_doubles, #as_factor, #as_float, #as_floats, #as_integer, #as_integers, #as_list, #as_matrix, #as_nested_array, #as_string, #as_strings, #complex?, create_data_frame, #dim, #environment?, #expression?, #factor?, #get_attribute, #has_attribute?, #inherits?, #integer?, #language?, #length, #list?, #logical?, #na?, #null?, #numeric?, #pair_list?, #raw?, #recursive?, #reference?, #split_array, #string?, #symbol?, #to_debug_string, #to_f, #to_i, #to_ruby_internal, #vector?

Constructor Details

#initialize(head, body) ⇒ Function

Returns a new instance of Function.



6
7
8
9
10
# File 'lib/rserve/rexp/function.rb', line 6

def initialize(head,body)
  super()
  @head=head
  @body=body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



5
6
7
# File 'lib/rserve/rexp/function.rb', line 5

def body
  @body
end

#headObject

Returns the value of attribute head.



5
6
7
# File 'lib/rserve/rexp/function.rb', line 5

def head
  @head
end

Instance Method Details

#to_rubyObject



11
12
13
# File 'lib/rserve/rexp/function.rb', line 11

def to_ruby
  {:head=>@head.to_ruby,:body=>@body.to_ruby}
end