In older versions of R (say R 3.3.1) the above code gave the following undesirable result:summary(15555) # Min. 1st Qu. Median Mean 3rd Qu. Max. # 15560 15560 15560 15560 15560 15560
This was always very confusing and hard to explain to beginners. To justify this you had to explain that “R, by default, calculates the summary rounded to 4 significant digits, and is simultaneously configured to give absolutely no indication has to how many significant digits are in fact being displayed.” To add insult to injury
summary()picked a different number of sigfigs than the default numeric presentation. One could type “median(15555)” and get the expected presentation “
I like this change.
Comments are closed