daru
https://github.com/sciruby/daru
Ruby
Data Analysis in RUby
Daru::Vector#lag
Lags the series by `k` periods. Lags the series by `k` periods, "shifting" data and inserting `nil`s from beginning or end of a vector, while preserving original vector's size. `k` can be positive or negative integer. If `k` is positive, `nil`s are inserted at the beginning of the vector, otherwise they are inserted at the end.
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-lag-for-pr
# Commit to gitgit add lib/daru/vector.rbgit commit -m "better docs for Daru::Vector#lag"
# 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-lag-for-pr
hub pull-request
# Celebrate!