Skip to content
Prev 62266 / 63424 Next

[External] Re: capture "->"

Maybe someone has already suggested this, but if your functions accepted
strings you could use sub or gsub to replace the -> with a symbol that
parsed at the same precedence as <-,
say <<-.  Then parse it and deal with it.  When it is time to display the
parsed and perhaps manipulated formulae to the user, deparse it and do the
reverse replacement.
[1] TRUE
[1] TRUE
[1] "x1 + x2 -> new_a3"

-Bill

On Mon, Mar 4, 2024 at 1:59?AM Dmitri Popavenko <dmitri.popavenko at gmail.com>
wrote: