Class: RSRuby

Inherits:
Object
  • Object
show all
Defined in:
lib/R.rb,
lib/carray/autoload/autoload_dataframe_dataframe.rb

Class Method Summary collapse

Class Method Details

.convert_method_name(name) ⇒ Object

Converts a String representing a ‘Ruby-style’ R function name into a String with the real R name according to the rules given in the manual.



9
10
11
12
13
14
15
16
# File 'lib/R.rb', line 9

def RSRuby.convert_method_name (name)
  if name.length > 1 and name[-1].chr == '_' and name[-2].chr != '_'
    name = name[0..-2]
  end
  name = name.gsub(/__/,'<-')
  name = name.gsub(/_/, '.')
  return name
end