Skip to main content

Working with Substitutions

  • Chapter
  • First Online:
Metaprogramming in R
  • 2219 Accesses

Abstract

Expressions, the kind you create using the quote function, come in four flavors: a primitive value, a name, a function call or a control structure, and a pairlist. Function calls include operators such as the arithmetic or logical operators because these are function calls as well in R, and control structures can be considered just a special kind of function calls—they only really differ from function calls in the syntax you use to invoke them.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    In the package pryr, which you will return to at the end of this chapter, there are functions, written in C, that do provide access to the internals of promises. Using pryr, you can get hold of both the expression and the associated environment of a promise in case you need it.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Thomas Mailund

About this chapter

Cite this chapter

Mailund, T. (2017). Working with Substitutions. In: Metaprogramming in R. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2881-4_5

Download citation

Publish with us

Policies and ethics