Say we have a function
my_fun <- function(...) {
substitute(list(...))[-1] %>%
sapply(deparse)
}
This behaves as expected:
> my_fun(iris, mtcars)
[1] "iris" "mtcars"
But this does not:
> iris %>% my_fun(mtcars)
[1] "." "mtcars"
How do I modify my function to take care of this?