daru
https://github.com/sciruby/daru
Ruby
Data Analysis in RUby
Daru::Vector.[]
Create a vector using (almost) any object * Array: flattened * Range: transformed using to_a * Daru::Vector * Numeric and string values == Description The `Vector.[]` class method creates a vector from almost any object that has a `#to_a` method defined on it. It is similar to R's `c` method. == Usage a = Daru::Vector[1,2,3,4,6..10] #=> # <Daru::Vector:99448510 @name = nil @size = 9 > # nil # 0 1 # 1 2 # 2 3 # 3 4 # 4 6 # 5 7 # 6 8 # 7 9 # 8 10
Edit
git clone [email protected]:sciruby/daru.git
cd daru
open lib/daru/vector.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Daru--Vector----for-pr
# Commit to gitgit add lib/daru/vector.rbgit commit -m "better docs for Daru::Vector.[]"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Daru--Vector----for-pr
hub pull-request
# Celebrate!