roll icon indicating copy to clipboard operation
roll copied to clipboard

support for `align`?

Open japhir opened this issue 3 years ago • 5 comments

In https://github.com/jjf234/roll/issues/37 you briefly discuss that the package currently only supports zoo's align = "right" option. Are there any plans to support align = "center"? The added value for me would be that this package allows for min_obs, which I couldn't figure out for zoo's implementation.

japhir avatar Jun 22 '21 16:06 japhir

To clarify: I did find zoo's partial argument, but couldn't get it to work with fill = NA so that I can force it to return a same-length vector which will fit nicely inside my mutate call.

japhir avatar Jun 22 '21 16:06 japhir

Thanks for the feedback. I currently don't have plans to support it but we can see whether there's demand or collaborators that want to help.

jasonjfoster avatar Jul 06 '21 21:07 jasonjfoster

for align left you can reverse your input vector rev, for align center you should be able to achieve it by shifting answer recalculating missing front/tail of the answer

jangorecki avatar Sep 02 '23 18:09 jangorecki