Dear all; First of all, this is probably a more conceptual question than a R-related one, but still want to give it a try. When working with the interpolation function "interp" from the package akima and the triangulation function "tri.mesh" from package tripack I've got NA's for the interpolation and "error" for the triangulation. The data is arranged in a regular grid as opposed to what the help page for interp says but I think this is an interesting problem because I found this code on the web as part of an stats course (and it is not the only example I found). Because I'm not really into the details of the functions I would like to hear comments from people who have used these functions before.
This is the code library(akima) library(fields) library(tripack) soil <- read.table("http://www.unc.edu/~zhuz/teaching/Stat890/Data/soil.txt",header=TRUE) attach(soil) soil.interp <- interp(u, v, moist) # linear interpolation works plot.surface(soil.interp) # spline interpolation soil.interp2 <- interp(u, v, moist, linear = F) # spline interpolation returns only NA's # triangulation tri.mesh(soil$u, soil$v) # got error Thanks ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.