Final guess as to observed behaviour: in the first case after removal of NAs there were an odd number of observations (so that sum was not called within the code for median). In your second call I suspect that even though you got an integer answer, it was found as sum(2,2)/2.
It seems to me the best way to deal with this "bug" would be to make calling median with a factor argument be an immediate error. Or just trust users never to attempt such a thing ... Simon Fear Senior Statistician Syne qua non Ltd Tel: +44 (0) 1379 644449 Fax: +44 (0) 1379 644445 email: [EMAIL PROTECTED] web: http://www.synequanon.com Number of attachments included with this message: 0 This message (and any associated files) is confidential and\...{{dropped}} ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help