That parser already flips -> to <- before creating the parse tree.

Gabor

On Mon, Apr 13, 2020 at 8:39 AM Adrian Dușa <dusa.adr...@gmail.com> wrote:
>
> I searched and tried for hours, to no avail although it looks simple.
>
> (function(x) substitute(x))(A <- B)
> #A <- B
>
> (function(x) substitute(x))(A -> B)
> # B <- A
>
> In the first example, A occurs on the LHS, but in the second example A is 
> somehow evaluated as if it occured on the RHS, despite my understanding that 
> substitute() returns the unevaluated parse tree.
>
> Is there any way, or is it even possible to detect the right hand assignment, 
> to determine whether A occurs on the LHS?
>
> Thanks in advance for any hint,
> Adrian
>
> —
> Adrian Dusa
> University of Bucharest
> Romanian Social Data Archive
> Soseaua Panduri nr. 90-92
> 050663 Bucharest sector 5
> Romania
> https://adriandusa.eu
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

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

Reply via email to