3 ms·
> It is sometimes possible to use = for assignment, though I don't understand when this is and is not allowed. Little bit of interesting history on this was ju
by squidfood 15y ago
> It is sometimes possible to use = for assignment, though I don't understand when this is and is not allowed.
Little bit of interesting history on this was just a google away:
http://blog.revolutionanalytics.com/2008/12/use-equals-or-arrow-for-assignment.html http://blog.revolutionanalytics.com/2008/12/use-equals-or-ar...
- cschmidt 15y agoI'm not sure that post is 100% correct. Reading it gave me a bad feeling that it missed something I'd read in the past. See here for example ... http://stackoverflow.com/questions/1741820/assignment-operators-in-r-and http://stackoverflow.com/questions/1741820/assignment-operat... The = operator is only a "top level" construct, while <- can be used anywhere. Now exactly what those limitations are may be a bit subtle (the OP's point), so I also just use <-.