Rserve::REXP::Factor

Attributes

levels[R]

Public Class Methods

new(ids,levels,attr=nil) click to toggle source
# File lib/rserve/rexp/factor.rb, line 5
def initialize(ids,levels,attr=nil)
  super(ids,attr)
  @levels = (levels.nil?)? Array.new : levels;
  @factor = RFactor.new(@payload, @levels, false, 1)
end

Public Instance Methods

as_factor() click to toggle source
# File lib/rserve/rexp/factor.rb, line 13
def as_factor
  @factor
end
as_strings() click to toggle source
# File lib/rserve/rexp/factor.rb, line 16
def as_strings
  @factor.as_strings
end
factor?() click to toggle source
# File lib/rserve/rexp/factor.rb, line 10
def factor?
  true
end
to_ruby_internal() click to toggle source
# File lib/rserve/rexp/factor.rb, line 22
def to_ruby_internal
  as_strings
end
to_s() click to toggle source
# File lib/rserve/rexp/factor.rb, line 19
def to_s
  super+"[#{levels.length}]"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.