-
Notifications
You must be signed in to change notification settings - Fork 8
Change treatment of NA
s and odd n
in pct_change
#17
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
Comments
Thanks for these good ideas @brookslogan. I just snuck in, on my last commit on #14, your second bullet point request: fail if The first bullet: this is a reasonable idea as a default, however looking at what I did for the derivative estimation function, all of the methods there actually try to gracefully handle |
@brookslogan Ok, I snuck in one more commit on #14, which addresses the I thought about putting an Since the main points in this issue are addressed by #14, I'm going to close it with that PR. If you want to make separate issues about speed (vectorization) and/or about better error checking, then I'd say go for it. My 2c: I don't know that as it is right now, speed is much of an issue with |
- Changing what we highlight about what this function does; also, moving "cor" to the front of the name - While I'm here, I snuck in a fix to the `NA` problem raised by Logan on #17. Now `pct_change()` and `estimate_deriv()` take as an argument `na_rm` with default value `TRUE`
Proposed semantic changes:
sum
instead ofSum
; if there is a missing observation in the middle of the computation window, the result should beNA
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"pct_change_{{x}}" := ......
when they don't provide a name, or requiring the user to explicitly provide a nameMaybe also consider vectorizing it to not rely on
slide_by_geo
? I don't know if performance is actually a consideration here.The text was updated successfully, but these errors were encountered: