Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Substitute

Substitutions in Language Objects


Description

Substitute differs from substitute in so far as its first argument can be a variable that contains an object of mode "language". In that case, substitutions take place inside this object.

Usage

Substitute(lang,with)

Arguments

lang

any object, unevaluated expression, or unevaluated language construct, such as a sequence of calls inside braces

with

a named list, environment, data frame or data set.

Details

The function body is just do.call("substitute",list(lang,with)).

Value

An object of storage mode "language" or "symbol".

Examples

lang <- quote(sin(x)+z)
substitute(lang,list(x=1,z=2))
Substitute(lang,list(x=1,z=2))

memisc

Management of Survey Data and Presentation of Analysis Results

v0.99.27.3
GPL-2
Authors
Martin Elff (with contributions from Christopher N. Lawrence, Dave Atkins, Jason W. Morgan, Achim Zeileis)
Initial release
2020-11-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.