From ludger.goeminne at vib-ugent.be  Fri Jan 19 15:33:25 2018
From: ludger.goeminne at vib-ugent.be (Ludger Goeminne)
Date: Fri, 19 Jan 2018 15:33:25 +0100 (CET)
Subject: [Rd] bug fix integer overflow in medpolish function
Message-ID: <2111235670.59687.1516372405230.JavaMail.zimbra@vib-ugent.be>

Dear R team 

I noticed a bug in the "medpolish" function in the "stats" package. 
When I run medpolish(x), with "x" the matrix in the attached .rda file, 
I get this rather cryptic error: 

"Error in if (converged) break : missing value where TRUE/FALSE needed 
In addition: Warning message: 
In sum(abs(z), na.rm = na.rm) : integer overflow - use sum(as.numeric(.))" 

I traced this down to the line: 

newsum <- sum(abs(z), na.rm = na.rm) 

I think this "overflow" could be easily fixed by changing this line to: 

newsum <- sum(as.numeric(abs(z)), na.rm = na.rm) 

With kind regards 

Ludger Goeminne 

? 
Ludger Goeminne - Ph.D. Student 

VIB-UGent Center for Medical Biotechnology 
Albert Baertsoenkaai 3 - 9000 Gent - Belgium 
Tel: +32 (0)9 264 9360 
mbc.vib-ugent.be 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: matrix.rda
Type: application/x-gzip
Size: 2071 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20180119/3257a421/attachment.bin>


[Rd] bug fix integer overflow in medpolish function
Ludger Goeminne