If do_substitute
is NA
, the following
rules are used:
An attempt is made to evaluate x
. If that fails, the expression is used.
If the evaluation succeeds and the value is a character vector, it is parsed.
If the value is not a character vector and the expression is a single name, the value is used.
Otherwise, the expression is used.
Once the expression is determined it may be simplified,
by extracting the language object from a length-one
expression vector, or the right-hand-side from a
formula.
Normally a warning will be issued if x
is a formula
containing a left-hand side. To suppress this,
wrap the formula in expression()
, or pass it
as a character string to be parsed.