John Mount walks us through some of the language conveniences available in the wrapr library:
wraprsupplies additionalq*()methods.
-
qae()“quote assignment expression” where both sides of assignments is taken as un-evaluated. I.e.:qae(x = 5+1)yields c(‘x’ = ‘5 + 1’) regardless ifxis bound or unbound in the environment. This is a bit of a complement to:=which looks-up bindings/references (i.e.:x = "z"; x := 5+1returns c(‘z’ = ‘6’)). -
qe()“quote expressions” for quoting complex expressions. Similar toquote(), except it returns a list of strings (not a language object). Theqe()method is not as interesting to end-users as the other methods mentioned, it is designed to help in implementation of methods that take a non-assignment expression or list of expressions such asrquery::select_rows_nse().
Read the whole thing. := probably gives the most obvious immediate benefit but the whole set seems useful.
Comments closed