Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sugar functions: cumprod, cummin, and cummax #388

Closed
nathan-russell opened this issue Oct 30, 2015 · 3 comments
Closed

Sugar functions: cumprod, cummin, and cummax #388

nathan-russell opened this issue Oct 30, 2015 · 3 comments

Comments

@nathan-russell
Copy link
Contributor

I'm preparing a PR that includes sugar counterparts for cumprod, cummin, and cummax in base R, along with the respective unit tests. I don't believe this will affect any existing code, and my unit tests & Travis build ran without hitch, but I wanted to open this issue for the sake of questions, concerns, or general discussion.

Briefly,

  • Rcpp::cumprod is templated for INTSXP, REALSXP, and CPLXSXP; and Rcpp::cummin & Rcpp::cummax are templated for INTSXP and REALSXP; in accordance with base::cumprod, base::cummin, and base::cummax, respectively
  • All three appear to handle NAs and matrix arguments correctly (re: in the same manner as base R)
@eddelbuettel
Copy link
Member

Absolute awesomeness for

  • opening issue before code submission
  • testing before even that and of course
  • new code

Negative points for zero time between issue ticket and pull request negating point 1. You still lead by 2:0 at the half ;-)

@nathan-russell
Copy link
Contributor Author

On the bright side, I wasn't docked any points for submitting on Read Only Friday : ). But noted - I will space things out more appropriately in the future, and thank you for the quick response,

@eddelbuettel
Copy link
Member

This has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants