A helper function for ordering window function output
A helper function for ordering window function output
This function makes it possible to control the ordering of window functions in R that don't have a specific ordering parameter. When translated to SQL it will modify the order clause of the OVER function.
order_by(order_by, call)
Arguments
order_by: a vector to order_by
call: a function call to a window function, where the first argument is the vector being operated on
Details
This function works by changing the call to instead call with_order() with the appropriate arguments.