[Rd] proposal for "strict" versions of subsetting operators

Ben Bolker bolker at zoo.ufl.edu
Tue Oct 28 17:51:40 MET 2003


  On a related topic: is there any chance/any interest in a slight 
modification of the subsetting code that would generate a warning when the 
user tried to subset with a non-integer?  The current behavior is that the 
non-integer is coerced to an integer, which means that e.g. x[3.8] is 
equivalent to x[3].  I can't think of (or find in the documentation) any 
time when this would actually be a desired behavior.
  The only integer-testing behavior that I can find in the code base is in 
some of the discrete-distribution code ...
  I might be able to hack this myself -- it looks as though ExtractSubset 
in subset.c might be the place to do this ...

   Ben Bolker


-- 
620B Bartram Hall                            bolker at zoo.ufl.edu
Zoology Department, University of Florida    http://www.zoo.ufl.edu/bolker
Box 118525                                   (ph)  352-392-5697
Gainesville, FL 32611-8525                   (fax) 352-392-3704



More information about the R-devel mailing list