[Rd] Lattice: Drawing a single contour line with a negative value fails

2009-08-19 Thread Thorn Thaler
Hi everybody, I want to add a single contourline to a levelplot. While everything works fine if the value at which the line should be drawn is positive, there is an error if the value is negative: library(lattice) my.panel <- function(..., at, contour=FALSE, labels=NULL) { panel.levelplot(

Re: [Rd] Polymorphism of predict

2009-08-19 Thread Greg Snow
Instead of using smooth.spline, use lm with spline terms, e.g.: > library(splines) > sp.fit <- lm(y~bs(x,4)) Now both use predict.lm for the predictions and all will be consistent. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail

Re: [Rd] Polymorphism of predict

2009-08-19 Thread Christian Brechbühler
On Wed, Aug 19, 2009 at 3:52 PM, Greg Snow wrote: > Instead of using smooth.spline, use lm with spline terms, e.g.: > > > library(splines) > > sp.fit <- lm(y~bs(x,4)) > > Now both use predict.lm for the predictions and all will be consistent. > > Hope this helps, > > -- > Gregory (Greg) L. Snow P