[R] Bug in lowess

Gavin Simpson gavin.simpson at ucl.ac.uk
Thu Oct 12 11:34:38 CEST 2006


On Wed, 2006-10-11 at 22:29 -0500, Frank E Harrell Jr wrote:
> x <- c(0,7,8,14,15,120,242)
> y <- c(122,128,130,158,110,110,92)
> 
> lowess(x,y)
> 
> $x
> [1]   0   7   8  14  15 120 242
> 
> $y
> [1]   122.0000   128.0000   132.2857   158.0000   110.0000 -4930.0000 
> 110.0000

Same behaviour here on a more recent R (below), and I recall a posting
for a year or so back that reported similar behaviour in the then
current version of R.

G

> x <- c(0,7,8,14,15,120,242)
> y <- c(122,128,130,158,110,110,92)
>
> lowess(x,y)
$x
[1]   0   7   8  14  15 120 242

$y
[1]   122.0000   128.0000   132.2857   158.0000   110.0000 -4930.0000
110.0000

> sessionInfo()
R version 2.4.0 Patched (2006-10-03 r39576)
i686-pc-linux-gnu

locale:
LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"
"datasets"
[7] "base"


> 
> 
> 
> R version 2.2.1, 2005-12-20, i486-pc-linux-gnu
> 
> attached base packages:
> [1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
> [7] "base"
> 
> other attached packages:
>    lattice     Hmisc     chron
> "0.12-11"   "3.1-1"   "2.3-8"
> 
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Gavin Simpson                 [t] +44 (0)20 7679 0522
 ECRC & ENSIS, UCL Geography,  [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-help mailing list