nathaneastwood / poorman

A poor man's dependency free grammar of data manipulation
https://nathaneastwood.github.io/poorman/
Other
340 stars 15 forks source link

Support Embracing (curly curly operateror) #95

Closed kalaschnik closed 2 years ago

kalaschnik commented 2 years ago

Compare with tidyverse:

library(tidyverse)
col_var <- "mpg"
mtcars %>% select({{ col_var }})

this does not work in poorman

nathaneastwood commented 2 years ago

I’m not sure it’s anything I want to support right now. Those operators are developed at the C level (I think) and that goes against the nature of poorman. I could in theory develop something to work at the R level but it would probably be very abstract and inefficient. Not to mention there are great NSE tools in base R already which I would encourage users to learn.

kalaschnik commented 2 years ago

I get your point. Are you referring to !!sym(col_var) as a base R alternative?

nathaneastwood commented 2 years ago

No, that's also rlang code. The base R equivalent would be functions that poorman takes advantage of such as bquote, eval, parse, substitute, etc. take a look at poorman:::dotdotdot()