Dear R development Team:  I really know very little, so you may ignore
this post.  I have found that my students often make the mistake of
mixing up comparisons and assignments with negative numbers:

  if (x<-3) do_something;

I parenthesize, but every once in a while, I forget and commit this
mistake, too.  so, I would suggest that R simply warn about an
ambiguity.  that is, it could suggest a space either between the < and
- , or after the <- .

  x< -3  ## means comparison already
  x<- 3  ## means assignment already
but warn when
  x<-3  ## ambiguity warning instead of assignment
  x<-(whatever)  ## ok

just a suggestion...

regards,

/iaw
----
Ivo Welch (ivo.we...@brown.edu, ivo.we...@gmail.com)

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to