Skip to content

Sugar functions: cumprod, cummin, and cummax #388

@nathan-russell

Description

@nathan-russell

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions