[R] rewrite of scatter.smooth to handle NAs

2005-02-10 Thread William Briggs
I rewrote scatter.smooth to handle missing values, but I have a question about a move I had to make. Here's the code: Mscatter.smooth-function (x, y, span = 2/3, degree = 1, family = c(symmetric, gaussian), xlab = deparse(substitute(x)), ylab = deparse(substitute(y)), ylim = range(y,

RE: [R] rewrite of scatter.smooth to handle NAs

2005-02-10 Thread Berton Gunter
Sent: Thursday, February 10, 2005 1:29 PM To: r-help@stat.math.ethz.ch Subject: [R] rewrite of scatter.smooth to handle NAs I rewrote scatter.smooth to handle missing values, but I have a question about a move I had to make. Here's the code: Mscatter.smooth-function (x, y, span = 2/3

Re: [R] rewrite of scatter.smooth to handle NAs

2005-02-10 Thread Prof Brian Ripley
You need evaluate deparse(substitute(x)) _before_ you change x. so have xlab; ylab early in the body of your function. However, NEWS in R-devel says o scatter.smooth() and loess.smooth() now handle missing values in their inputs. so why reinvent that wheel? On Thu, 10 Feb