From kim@@eonghyun @ending from eric@@on@com  Thu Sep 20 09:27:22 2018
From: kim@@eonghyun @ending from eric@@on@com (Kim Seonghyun)
Date: Thu, 20 Sep 2018 07:27:22 +0000
Subject: [Rd] A different error in sample()
In-Reply-To: <SYCPR01MB41112555F67E1CAD438FCB6BCD1C0@SYCPR01MB4111.ausprd01.prod.outlook.com>
References: <5b6950ce-ac7a-4f6a-da61-8e70d25bb08c@gmail.com>,
 <CAO1zAVbHXAz9o7uf98Q5pUm7R8pSHFigAAtQn90FrGdPfqUn1A@mail.gmail.com>
 <SYCPR01MB41112555F67E1CAD438FCB6BCD1C0@SYCPR01MB4111.ausprd01.prod.outlook.com>
Message-ID: <VI1PR07MB1616238B31968EBEA911B6F292130@VI1PR07MB1616.eurprd07.prod.outlook.com>

Hi,

I have not checked the source code, but I think it is because of banker's round.

https://en.wikipedia.org/wiki/Rounding#Round_half_to_even

Best regards,
Kim

-----Original Message-----
From: R-devel <r-devel-bounces at r-project.org> On Behalf Of Dario Strbenac
Sent: den 20 september 2018 03:00
To: r-devel <r-devel at r-project.org>
Subject: Re: [Rd] A different error in sample()

Good day,

The use of "rounding" also doesn't make sense. If The number is halfway between two integers, it is rounded to the nearest even integer.

> round(2.5)
[1] 2

--------------------------------------
Dario Strbenac
University of Sydney
Camperdown NSW 2050
Australia
______________________________________________
R-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] A different error in sample()
Kim Seonghyun