daru

https://github.com/sciruby/daru

Ruby

Data Analysis in RUby

Daru::Vector#[]

Get one or more elements with specified index or a range.

== Usage
  # For vectors employing single layer Index

  v[:one, :two] # => Daru::Vector with indexes :one and :two
  v[:one]       # => Single element
  v[:one..:three] # => Daru::Vector with indexes :one, :two and :three

  # For vectors employing hierarchial multi index

Source | Google | Stack overflow

Edit

git clone [email protected]:sciruby/daru.git

cd daru

open lib/daru/vector.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Daru--Vector----for-pr


# Commit to git

git add lib/daru/vector.rbgit commit -m "better docs for Daru::Vector#[]"


# Open pull request

gem 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!