replace_symbol_in_expr | R Documentation |
Replace symbols in an expression
replace_symbol_in_expr(expression, target, replace)
expression |
Expression
|
target |
Target symbol
|
replace |
Replacing symbol
|
The expression where every occurrence of the symbol target
is
replaced by replace
Stefan Bundfuss
Helpers for working with Quosures:
add_suffix_to_vars()
,
expr_c()
,
replace_values_by_names()
library(rlang)
replace_symbol_in_expr(expr(AVAL), target = AVAL, replace = AVAL.join)
replace_symbol_in_expr(expr(AVALC), target = AVAL, replace = AVAL.join)
replace_symbol_in_expr(expr(desc(AVAL)), target = AVAL, replace = AVAL.join)
replace_symbol_in_expr(expr(if_else(AVAL > 0, AVAL, NA)), AVAL, AVAL.join)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.