2 ms·
I think the issue is assignment in R is an expression rather than a statement (I think), but there are some other places where '=' gets used for different synta
by jacobolus 17y ago
I think the issue is assignment in R is an expression rather than a statement (I think), but there are some other places where '=' gets used for different syntax, and you always use <- for assignment, even in those situations. For me, it doesn't come up, because as a Python programmer I've fully bought into the idea that assignment should be a statement, and so I don’t try to use it as an expression in code. If you’re used to Python, then you’ll be used to seeing "=" for both assignment and keyword function arguments, so there’s no real confusion.
I've never had a problem, but again, I've never tried to write R libraries for public consumption, or hack on large chunks of existing R code, so YMMV.