Skip to content

Change treatment of NAs and odd n in pct_change #17

@brookslogan

Description

@brookslogan

Proposed semantic changes:

  • use sum instead of Sum; if there is a missing observation in the middle of the computation window, the result should be NA
  • produce an error if n is odd rather than silently changing it to an even number; alternatively make it the half-width of the computation window rather than the full width
  • maybe change the naming semantics; e.g., something like "pct_change_{{x}}" := ...... when they don't provide a name, or requiring the user to explicitly provide a name
  • add some more input validation

Maybe also consider vectorizing it to not rely on slide_by_geo? I don't know if performance is actually a consideration here.

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