roll
roll copied to clipboard
apply user defined function
Thanks for the great package. Any chance we can have a zoo::roll_apply
type of thing?
Thanks for the feedback. I don't have plans to support user-defined functions because there's not much value the roll
package could add relative to existing implementations. Specifically the advantage of the roll
package is fast and efficient computation via online algorithms that are implemented in parallelized C++. In contrast, a user-defined function is unable to take advantage of these benefits, e.g. RcppParallel requires code not call R in any fashion (read more here: http://rcppcore.github.io/RcppParallel/#thread_safety). For these reasons, the marginal benefit of another implementation is low.
Point well taken. A thing to consider is that roll
can then provide a one stop solution to all the rolling functions. In any case, thanks again for the great package!