[R] "sum" bug?

Kenneth Cabrera krcabrer at epm.net.co
Fri Mar 22 05:19:08 CET 2002


Dear R users and developers:

I got this message when I try to make the summary of a numeric variable,

 > summary(Dep)
  
  Min.   1st Qu.    Median      Mean   3rd Qu.      Max.
0.000e+00 1.192e+07 2.739e+07           6.538e+07 1.858e+09
Warning message:
Integer overflow in sum(.); use sum(as.numeric(.))

and it fails to make the sum (for calculate the mean), but I don't 
understand the "Integer overflow"

If I type the following command,

 > summary(as.numeric(Dep))
     Min.   1st Qu.    Median      Mean   3rd Qu.      Max.
0.000e+00 1.192e+07 2.739e+07 5.306e+07 6.538e+07 1.858e+09

 it works fine.... but I still don't undertand way it doesn't work without
the "as.numeric" coerce, when other functions like "sd()" worked fine.

Thank you very much for your advice

Kenneth Cabrera

P.S.: The length of Dep is 5297
And I am working on W2K in R1.4.1. version.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20020321/d6f73da4/attachment.html


More information about the R-help mailing list