Disable the number of packets. First you have to choose which 2D kernel score you want. In the field package, you have the smooth.2d function, and you have the wonderful package of Brian Ripley, KernSmooth. Additional points for code snippets that you can provide help files, I will not copy them.
www.rseek.org.