[Rd] seq.int broken (seq as well) (PR#14169)

Jens Oehlschlägel oehl_list at gmx.de
Mon Jan 11 22:19:12 CET 2010


Petr,

Aside of the fact that the argument about someting bad being good because documented is strongly overused. I think this does NOT behave as documented, because 
a) the behaviour cannot be explained by rounding error on double precision. 
b) 1e7 is not even outside the range of integer calculation
Up to the limit of a) or at least upto b) any expression of the type seq(a, b, by=b) should only return a but not b. Also something like seq.int should ONLY use and return integer, for performance reasons, but even more so for reliability: the reported behaviour is not just a little bit wrong. Since seq is used for looping in R, the looping of the language is broken. This can have severe consequences like accessing beyond the limits of an array. If C-code is involved, this can crash R. In the worst case algorithms can silently do wrong. Being an admirer of R since its early days, I was shocked to see this, and as a consequence, I suggest we do our homework and suspend -- for a year or two -- any claims that R can be used productive such as SAS. 

Yours regretfully
Jens Oehlschlägel



More information about the R-devel mailing list