Have you considered the "fda" package and the companion book, "Functional Data Analysis with R and Matlab" (Springer, 2009) by Ramsay, Hooker and Graves? This will NOT help you directly with bathymetry = f(long, lat), but will help with b=f(x)+e AND with translations between Matlab and R.

To fit z=f(x,y), you may want "thin plate splines". To find R capability for those, you might install the "sos" package and try the following (which requires Internet access):

library(sos)
tps <- ???'thin plate splines'
summary(tps) # 38 help pages found in 9 packages
tsp # opens a web browser
The "sos" package includes a vignette, which is essentially a copy of an article from the latest issue of The R Journal.

Hope this helps. Spencer


karine heerah wrote:
Hi everybody.

i have 2 datasets : one with a long grid a lat grid and a bathymetry grid

the second one only has the long and lat coordinates.

So i want to know the bathymetry associated to the second dataset. I thought it 
was a good idea to do an interpolation between the two datasets. I find a 
script doing that on matlab but i want to do it on R. Do you how to do it?

for ii = 1:length(seal_dive_depth07)
seal_bathy_depth07(ii) = interp2(long,latg,A,seal_lon07(ii),seal_lat07(ii));
end



Karine HEERAH
Master 2 mention "océanographie et environnements marins", parcours océanique 42 rue Salvador Allende 92000 Nanterre
06.61.50.97.47



_________________________________________________________________



        [[alternative HTML version deleted]]

------------------------------------------------------------------------

______________________________________________
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.


--
Spencer Graves, PE, PhD
President and Chief Operating Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph:  408-655-4567

______________________________________________
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.

Reply via email to