with_order function

Run a function with one order, translating result back to original order

Run a function with one order, translating result back to original order

This is used to power the ordering parameters of dplyr's window functions

with_order(order_by, fun, x, ...)

Arguments

  • order_by: vector to order by
  • fun: window function
  • x, ...: arguments to f
  • Maintainer: Hadley Wickham
  • License: MIT + file LICENSE
  • Last published: 2023-11-17