>>> Bryan Hanson <han...@depauw.edu> 03/14/10 2:39 AM >>>
>Under what circumstances would the documented behavior be valuable?  

<Inserts tongue in cheek:>
It would be useful in all the circumstances in which it would be
sensible to use a real number as a vector index.

Not that I can think of any.

Somebody else might, though. And it is possible that someone might
calculate intended integer values from reals, leading to a real vector
of indices. Under those circs, returning an error or warning wouldn't be
helpful. So in this case R is kind of treating users like grown-ups who
are assumed to know what they're doing. 

It's also pedagogically (is that a word?) useful. Users who confuse
reals with integers may remember the lesson better if it fouls up their
entire script with a problem that takes hours to track down than if it
generates a polite warning they don't understand but accommodate by
changing the script. And that kind of difference is occasionally
terribly important in statistics and in general computing. So maybe it
is useful to be allowed to foul up occasionally.

<removes tongue from cheek>

Steve E

*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to