@gaborcsardiI think R should not allow string literals in place of names, full stop. This change is even worth breaking a few packages on CRAN, IMHO, because the current behaviour is plain bananas and causes plenty of confusion.
@gaborcsardi Yes, backticks came later. And there’s still some ancient core R code which uses "-quoted names, but that could obviously be fixed when deprecating/removing the syntax. But I don’t think there’s appetite for it.
@hrbrmstr But it only works with NA_character_, not NA, NA_real_, TRUE or any other reserved names. — And the reason is that NA_character_ (unlike all the others) is a character literal.
» NA = 1
Error in NA = 1 : invalid (do_set) left-hand side to assignment
Add comment