On 01/03/2024 4:17 a.m., Dmitri Popavenko wrote:
Hi everyone,

I am aware this is a parser issue, but is there any possibility to capture
the use of the inverse assignment operator into a formula?

Something like:

foo <- function(x) substitute(x)

gives:

foo(A -> B)
B <- A

I wonder if there is any possibility whatsoever to signal the use of ->
instead of <-

If you parse it with srcrefs, you could look at the source. The parser doesn't record whether it was A -> B or B <- A anywhere else.

Duncan Murdoch

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to