Skip to content
Prev 206692 / 398503 Next

advice/opinion on "<-" vs "=" in teaching R

On Mon, 18 Jan 2010, S Ellison wrote:

            
Evidence?(*)
That could be taken as an argument to use = for binding (ie,making a new variable) and <- for destructive assignment, since then the use of = would match what it does in argument lists, and the genuinely different operations would be distinguished by syntax.  I don't think anyone does that.

I believe that the reason for introducing = as an option for assignment was in fact to improve the readability of code for programmers of other languages.

      -thomas


(*) I only said what I would do. You are making a general optimality claim.

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle