[R] round(1.5) = round(2.5) = 2?

From: Markus Didion <markus.didion_at_env.ethz.ch>
Date: Sun, 15 Jun 2008 11:26:18 +0200


Dear R-users

with a bit of grief I had to repeat an extensive analysis because I did not suspect (and therefore did not read the documentation) that round was implemented as "for rounding off a 5, the IEC 60559 standard is expected to be used, 'go to the even digit'", resulting in round(1.5) = 2
round (2.5) = 2.

As a non-mathematician I am both puzzled and intrigued by this rule as it is against what I have learned in my math courses, i.e. round(1.5) = 2
round (2.5) = 3.

I would like to understand the reason behind this rule.

Thanks for your comments.

Markus

--

Markus Didion

Waldkologie						Forest Ecology
Inst. f. Terrestrische Oekosysteme		Inst. of Terrestrial Ecosystems
Departement Umweltwissenschaften	Dept. of Environmental Sciences
Eidg. Technische Hochschule			Swiss Fed. Inst. of Technology
ETH-Zentrum CHN G78				ETH-Zentrum CHN G78
Universittstr. 22						Universitaetstr. 22
CH-8092 Zrich						CH-8092 Zurich
Schweiz								Switzerland

Tel +41 (0)44 632 5629		Fax +41 (0)44 632 1358	
Email markus.didion_at_env.ethz.ch
homepage: http://www.fe.ethz.ch/people/didionm
	[[alternative HTML version deleted]]


______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Received on Sun 15 Jun 2008 - 09:30:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 16 Jun 2008 - 17:30:42 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive