[R] loess.smooth dumps core

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Mar 28 23:41:03 CEST 2000


Stuart Luppescu <s-luppescu at uchicago.edu> writes:

> Has the loess.smooth() function changed? It used to work, but now it causes R
> to abort with a segmentation fault. I stole the function points.lines() from
> V&R 1st ed. pp. 67--68, but now it only works if I remove the line with
> loess.smooth. Here's the function I'm using:
> 
> points.lines <- function(x, y, ...)
>   {
>     cor1 <-round(cor(x, y, use="pairwise"), digits=2)
>     ok <- !(is.na(x) | is.na(y))
>     points(x, y, ...)
>     lines(loess.smooth(x=x[ok], y=y[ok]), col=3)
>     abline(coef=c(0, 1))
>     text(min(x, na.rm=T), max(y, na.rm=T), cor1)
>   }
> 
> Is this a bug?

Segmentation faults are always bugs (unless it is caused by your own C
code), but I can't make this happen on my system. Please tell us which
system you have and preferably also where about the problem appears
(provoking the fault while running under gdb is usually effective, as
is a subsequent 'bt' command) and/or give exact instructions how to
duplicate the problem.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list