[Rd] Bug in comparison of language objects?

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Tue Feb 20 14:03:58 CET 2024


I noticed the following odd behaviour today:

   exprs <- expression( mean(a), mean(b), { a }, { b } )

   exprs[[1]] == exprs[[2]]
   #> [1] FALSE

   exprs[[3]] == exprs[[4]]
   #> [1] TRUE

Does it make sense to anyone that the argument passed to `mean` matters, 
but the expression contained in braces doesn't?

Duncan Murdoch



More information about the R-devel mailing list