The opposite of str2lang()
, lang2str()
converts an
expression into a character string. Note that
lang2str()
does not support the normal expression syntax for elixir
, so
just expects an already-parsed expression.
Details
This function is essentially identical to deparse1()
, which has been
available since R 4.0.0, except with collapse = ""
instead of
collapse = " "
.
Examples
lang2str(quote(a + b + c))
#> [1] "a + b + c"