daru
https://github.com/sciruby/daru
Ruby
Data Analysis in RUby
Daru::Maths::Statistics::Vector#count
Retrieves number of cases which comply condition. If block given, retrieves number of instances where block returns true. If other values given, retrieves the frequency for this value. If no value given, counts the number of non-nil elements in the Vector.
Edit
git clone [email protected]:sciruby/daru.git
cd daru
open lib/daru/maths/statistics/vector.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Daru--Maths--Statistics--Vector-count-for-pr
# Commit to gitgit add lib/daru/maths/statistics/vector.rbgit commit -m "better docs for Daru::Maths::Statistics::Vector#count"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Daru--Maths--Statistics--Vector-count-for-pr
hub pull-request
# Celebrate!