Class: Rri::RConverters::StringConverter
- Inherits:
-
Object
- Object
- Rri::RConverters::StringConverter
- Defined in:
- lib/rri/r_converters/string_converter.rb
Overview
Converter for ruby Strings
Convert ruby Strings to character vector in R
Instance Method Summary collapse
-
#convert(obj) ⇒ Array
Convert ruby object to R format.
Instance Method Details
#convert(obj) ⇒ Array
Convert ruby object to R format
If the ruby object is a String, converts it into an R character vector
18 19 20 21 22 23 24 |
# File 'lib/rri/r_converters/string_converter.rb', line 18 def convert(obj) if obj.kind_of? String [true, REXPString.new(obj)] else [false, nil] end end |