© Thomas Mailund 2017

Thomas Mailund, Metaprogramming in R, 10.1007/978-1-4842-2881-4_5

5. Working with Substitutions

Thomas Mailund

(1)Aarhus N, Denmark

You can take expressions and manipulate them by treating them as strings, but you can also modify them by substituting variables for expressions. In addition, you can build expressions by using more advanced quoting, and you can move back and forth between strings and expressions.

A Little More on Quotes

This chapter starts with quickly revisiting the quote mechanism. You have already seen how to quote expressions , but you can do more than just create verbatim expressions . I have discussed the quote function in some detail, but I showed the bquote function only in passing. The bquote function allows ...

Get Metaprogramming in R: Advanced Statistical Programming for Data Science, Analysis and Finance now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.