Passing strings as arguments in dplyr verbs

前端 未结 3 852
时光取名叫无心
时光取名叫无心 2021-02-19 17:01

I would like to be able to define arguments for dplyr verbs

condition <- \"dist > 50\"

and then use these strings in

3条回答
  •  醉话见心
    2021-02-19 17:17

    In the next version of dplyr, it will probably work like this:

    condition <- quote(dist > 50)
    
    mtcars %>%
       filter_(condition)
    

提交回复
热议问题