Method: Statsample::FitModel#canonicalize_df
- Defined in:
- lib/statsample/formula/fit_model.rb
#canonicalize_df(orig_df) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/statsample/formula/fit_model.rb', line 30 def canonicalize_df(orig_df) tokens = @formula.canonical_tokens tokens.shift if tokens.first.value == '1' df = tokens.map { |t| t.to_df orig_df }.reduce(&:merge) df end |