Class: Rserve::REXP::Null
Overview
represents a NULL object in R. Note: there is a slight asymmetry - in R NULL is represented by a zero-length pairlist. For this reason REXPNull returns true for #isList() and #asList() will return an empty list. Nonetheless REXPList of the length 0 will NOT return true in #isNull() (currently), becasue it is considered a different object in Java. These nuances are still subject to change, because it’s not clear how it should be treated. At any rate use REXPNull instead of empty REXPList if NULL is the intended value.
Constant Summary
Constants inherited
from Rserve::REXP
MaxDebugItems, MismatchError
Instance Attribute Summary
Attributes inherited from Rserve::REXP
#attr
Instance Method Summary
collapse
#as_bytes, #as_double, #as_double_matrix, #as_doubles, #as_factor, #as_float, #as_floats, #as_integer, #as_integers, #as_matrix, #as_nested_array, #as_string, #as_strings, #complex?, create_data_frame, #dim, #environment?, #expression?, #factor?, #get_attribute, #has_attribute?, #inherits?, #initialize, #integer?, #language?, #length, #logical?, #na?, #numeric?, #pair_list?, #raw?, #recursive?, #reference?, #split_array, #string?, #symbol?, #to_debug_string, #to_f, #to_i, #to_ruby_internal, #vector?
Constructor Details
This class inherits a constructor from Rserve::REXP
Instance Method Details
#==(v) ⇒ Object
9
10
11
|
# File 'lib/rserve/rexp/null.rb', line 9
def ==(v)
v.is_a? self.class
end
|
#as_list ⇒ Object
15
16
17
|
# File 'lib/rserve/rexp/null.rb', line 15
def as_list
Rlist.new
end
|
#list? ⇒ Boolean
12
13
14
|
# File 'lib/rserve/rexp/null.rb', line 12
def list?
true
end
|
#null? ⇒ Boolean
6
7
8
|
# File 'lib/rserve/rexp/null.rb', line 6
def null?
true
end
|
#to_ruby ⇒ Object
18
19
20
|
# File 'lib/rserve/rexp/null.rb', line 18
def to_ruby
nil
end
|