Learning a spatial function I have some observations of a variable y, that varies spatially. For each observation, I also have a lat, long tuple. I have some 50 or so observations. Besides conducting some exploratory analysis such as variog in R, is there a generic way to learn the function y = f(lat,long)? 
In general I do expect that y should increase as we move north but beyond that not much. Any ideas welcome. I have dabbled with fitting a gam model in R, but that seems an adhoc way given that it arbitrarily smooths and such. Part of the problem is that I don't know what functional forms make physical sense for my data set.
 A: Could you clarify what you mean by "learn the function"?
If you are interested in the relationship between east-west and north-south rather than actual distance or spatial relationship among the points, my suggestion would be to start by breaking apart the items in your latitude & longitude tuple as separate variables and then expressed as Cartesian coordinates. 
Using those coordinates, you could do correlation analysis or a regression with the two Cartesian points to separately measure the E-W and N-S effects. The functional form of your regression will depend, of course on what makes sense for your data. 
Alternatively, if you just want to show the directional variation in your data, you could simply map them. I'm not familiar enough with R to make any suggestions on how to do so, but this article might be helpful. You could also cross-reference that map with a measure of spatial autocorrelation for your variable(s) of interest. I would suggest starting with Moran's I.
For the conversion of the coordinates:
If your points are all in the same quadrant (that is, half-hemisphere), you should be able to use those values. Otherwise, you will probably want to specify W longitudes as negative values and likewise for S latitudes.
In order to then convert those coordinates into Cartesian coordinates, you'll need to transform them. This question and answer show how in detail. (Note that this involved spherical coordinates and 3-dimensional Cartesian coordinates. You should be able to safely ignore the z-coordinate). 
