[R] namespace question

Erich Neuwirth erich.neuwirth at univie.ac.at
Mon May 1 23:31:35 CEST 2006


I need to modify the function "loess.smooth" from package stats
to accept an additional weight parameter.
I found the places where I need to change things,
but there is a problem remaining (in R 2.2.1).
loess.smooth contains the call

    fit <- simpleLoess(y, x, w, span, degree, FALSE, FALSE,
		       normalize=FALSE, "none", "interpolate",
		       control$cell, iterations, control$trace.hat)

Since simpleLoess is not exported from stats,
I need to change this to

    fit <- stats:::simpleLoess(y, x, w, span, degree, FALSE, FALSE,


Furthermore, simpleLoess does

    z <- .C(R_loess_ifit,

Changing this to

    z <- .C(stats:::R_loess_ifit,


solves the problem in R 2.3.0, but not in R 2.2.1
Is there an easy solution for 2.2.1 also?





-- 
Erich Neuwirth
Institute for Scientific Computing and
Didactic Center for Computer Science
University of Vienna
phone: +43-1-4277-39464  fax: +43-1-4277-39459




More information about the R-help mailing list