Yes, it was intended. It worked before by integer overflow, but only on 32-bit platforms: it crashed on 64-bit platforms. In other words, it was an uncaught error in 1.8.1.
On Mon, 22 Mar 2004, Martin Maechler wrote: > >>>>> "JensOe" == Jens Oehlschlägel <[EMAIL PROTECTED]> > >>>>> on Mon, 22 Mar 2004 18:03:08 +0100 writes: > > JensOe> I was notfied that my package ref fails R CMD CHECK > JensOe> under 1.9.0 Alpha. I downloaded the windows version > JensOe> of 1.9.0 Alpha (dated 2004-03-17) and package ref > JensOe> passes R CMD CHECK without any complaints. > > JensOe> The daily checks suggest the problem arises in > JensOe> example(optimal.index) > > JensOe> Error in identical(l[i], l[optimal.index(i, n = > JensOe> length(l), strict = FALSE)]) : only 0's may mix with > JensOe> negative subscripts > > JensOe> where negative subscripts are mixed with NAs (which > JensOe> was legal in versions prior 1.9.0). > > JensOe> Is it an intended change not to allow NA mix with > JensOe> negative subscripts any longer? (I did not find any > JensOe> hint in NEWS) > > A shorter version is > > > x <- 1:9; x[-c(-1,NA,3:5)] > Error: only 0's may mix with negative subscripts > > which used to simply give > > > x <- 1:9; x[-c(1,NA,3:5)] > [1] 2 6 7 8 9 > > and is the same if there was no NA in the index -- without a warning; > not necessarily desirable as well. > > --------- > > However, the current NEWS file does say > > > o Negative subscripts that were out of range or NA were not handled > correctly. > > > R 1.9.0 (beta)'s behavior seems to match the one of S-plus here, > but that alone is not convincing enough IMO. > > Regards, Martin > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-devel > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-devel