From glnbrntt at gmail.com  Sun May 28 03:28:26 2017
From: glnbrntt at gmail.com (GlenB)
Date: Sun, 28 May 2017 11:28:26 +1000
Subject: [Rd] stats::line() does not produce correct Tukey line when n mod 6
 is 2 or 3
Message-ID: <CAN7_cLjefc605D1ATS__MOV4gN7fKDBo5Nx_CNB_B9cDbAxc6w@mail.gmail.com>

Bug: stats::line() does not produce correct Tukey line when n mod 6 is 2 or
3

Example: line(1:9,1:9) should have intercept 0 and slope 1 but it gives
intercept -1 and slope 1.2

Trying line(1:i,1:i) across a range of i makes it clear there's a cycle of
length 6, with four of every six correct.

Bug has been present across many versions.

The machine I just tried it on just now has R3.2.3:

               _
platform       x86_64-w64-mingw32
arch           x86_64
os             mingw32
system         x86_64, mingw32
status
major          3
minor          2.3
year           2015
month          12
day            10
svn rev        69752
language       R
version.string R version 3.2.3 (2015-12-10)
nickname       Wooden Christmas-Tree

	[[alternative HTML version deleted]]



[Rd] stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
GlenB