out<- nkreg( rat.diet$t, rat.diet$con, bandwidth=3, n.points=100)
plot( rat.diet$t, rat.diet$con)
lines( out$x, out$y)
# 2-d example evaluate at 40 points
out<- nkreg( precip$x, precip$y, bandwidth=.5, n.points=64)
image.plot( as.surface(out$x, out$y))
Run the code above in your browser using DataLab