Re: [R] Bug in lowess

From: Gavin Simpson <gavin.simpson_at_ucl.ac.uk>
Date: Thu 12 Oct 2006 - 09:34:38 GMT

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
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
R-help@stat.math.ethz.ch 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 Thu Oct 12 19:50:22 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 12 Oct 2006 - 12:30:09 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.