Class: Rust::Plots::GGPlot::Aes

Inherits:
Object
  • Object
show all
Defined in:
lib/rust/external/ggplot2/core.rb

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ Aes

Returns a new instance of Aes.



42
43
44
45
# File 'lib/rust/external/ggplot2/core.rb', line 42

def initialize(**options)
    options = options.map { |k, v| [k, v.is_a?(Symbol) ? Rust::Variable.new(v) : v] }.to_h
    @options = Rust::Options.from_hash(options)
end

Instance Method Details

#to_RObject



47
48
49
50
51
# File 'lib/rust/external/ggplot2/core.rb', line 47

def to_R
    function = Rust::Function.new("aes")
    function.options = @options if @options
    return function.to_R
end