2D interpolation function
On Tue, 22 May 2001, Jim Lemon wrote:
As part of a project I am doing, I had to present a 2D table as a surface. This was fairly straightforward (using persp), but I needed to interpolate points to make it sort of pretty. This was done by using quadratic interpolation between the existing points to smooth out the surface a bit. As I couldn't find an R function that did this, I wrote an admittedly nasty pair of functions that will interpolate any reasonable number of equally spaced points between the values of an object produced by table(), smoothed with any reasonable power function of the distance. In practice, this means I tested it with up to four or five interpolated points up to a cubic interpolation. If anyone is interested in telling me: a) I overlooked an existing function (p~0.95)
package akima contains functions that will do a better job than distance-based interpolation. You could also use kriging (spatial, sgeostat, geoR).
b) This would be a useful function for them (p~0.01) I would be happy to hear about it. Jim PS - I assumed that the remaining 0.04 would be the probability that no one was interested. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._