Skip to content
Prev 154727 / 398503 Next

Interpolation Problems

On 01/09/2008 6:17 PM, Steve Murray wrote:
What is JanAv?  approxfun needs to be able to construct x and y values 
to interpolate; it may be that your JanAv object doesn't allow it to do 
that.  (The general idea is that it will consider y to be a function of 
x, and will construct a function that takes arbitrary x values and 
returns y values matching those in the dataset, with some sort of 
interpolation between values.)

If you really have longitude and latitude on some sort of grid, you 
probably want a two-dimensional interpolation, not a 1-d interpolation 
as done by approxfun.  The interp() function in the akima() package does 
this, but maybe not in the format you need.

Duncan Murdoch