Let's say I want to order a data.frame
using multiple columns and using non-standard evolution. I might have a function that looks something like this
my_order <- function(data, ...) {
with(data, order(...))
}
I get an error when I use this function because my columns are not evaluated within the context of with
.
my_order(mtcars, mpg, cyl)
# Error in order(...) : object 'mpg' not found
NOTE: I do not wish to use dplyr::arrange()
for this problem as it adds a dependency.