Skip to content

seq.int broken (seq as well) (PR#14169)

2 messages · Jens Oehlschlägel, Barry Rowlingson

#
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
1 day later
#
2010/1/11 Jens Oehlschl?gel <oehl_list at gmx.de>:
Invalid Argument Error

 What does SAS do in these cases? How do you know? How do you know if
your SAS code isn't silently doing wrong? How do you know what caused
your SAS session to crash? How do you know what algorithms SAS uses
deep down inside?

 R gives you the source code, you can find these things out. The great
irony here is that SAS have "THE POWER TO KNOW" as a registered
trademark.

 Perhaps The R Foundation should trademark "THE POWER TO LEARN"?

Barry