If you use tidyverse, you can use something like this:
c("mpg>15", "am==1") %>% map(myfun) %>% bind_rows
But, we can also shorten this by using map_df, which returns a data frame:
c("mpg>15", "am==1") %>% map_df(my_function)
A mixed option, three equivalent ways, using lapply:
lapply(c("mpg>15", "am==1"), my_function) %>% bind_rows
c("mpg>15", "am==1") %>% lapply(my_function) %>% bind_rows
bind_rows(lapply(c("mpg>15", "am==1"), my_function))
You can also mix base and tidyverse:
c("mpg>15", "am==1") %>% lapply(my_function) %>% do.call(rbind, .)
Another option is as follows:
do.call(rbind, lapply(c("mpg>15", "am==1"), my_function))