daru
https://github.com/sciruby/daru
Ruby
Data Analysis in RUby
Daru::Category#to_ints
Returns integer coding for categorical data in the order starting from 0. For example if order is [:a, :b, :c], then :a, will be coded as 0, :b as 1 and :c as 2
Edit
git clone [email protected]:sciruby/daru.git
cd daru
open lib/daru/category.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Daru--Category-to_ints-for-pr
# Commit to gitgit add lib/daru/category.rbgit commit -m "better docs for Daru::Category#to_ints"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Daru--Category-to_ints-for-pr
hub pull-request
# Celebrate!