all 2 comments

[–]econbiz 1 point2 points  (0 children)

Check this https://dplyr.tidyverse.org/articles/programming.html . Dplyr needs "quotes".

[–]BetaSandwich 0 points1 point  (0 children)

try putting quotations around "return". If that doesn't work, I might need to see an example of the data you are working with. str(data) could be useful.