# ..f should be able to work with a list or a data frame. As it
# happens, sum() handles data frame so the following works:
mtcars %>% by_row(sum)
# Other functions such as mean() may need to be adjusted with one
# of the lift_xy() helpers:
mtcars %>% by_row(lift_vl(mean))
# To run a function with map_rows(), make sure it is variadic (that
# it accepts dots)
mtcars %>% map_rows(sum)
mtcars %>% map_rows(lift_vd(mean))
Run the code above in your browser using DataLab