This library contains an R implementation of the S-Plus function interp().

See ChangeLog for details about further versions

Version 0.1-1

I used the S-Plus version of interp() (S-Plus 3.3 f. Win 3.11) as starting
point. Then I searched for Akimas idsfft function, which is referenced in 
interp().

I found the appropriate Fortran code (1978) in the ACM Collected 
Algorithms archive under

   http://www.netlib.org/toms/526

(also included here) and splitted it into the Fortran files under src/ . 
The test driver ttidbs is also included and can be compiled with "make test".

However, it seems that this code differs a little bit from that used in S-Plus:
It implements "only" bicubic spline interpolation, no linear interpolation as
in S-Plus.

So I modified IDSFFT and added a subroutine IDPTLI which does linear 
interpolation within the triangles, generated by IDTANG.

Further changes are
+ REAL -> DOUBLE PRECISION 
+ static DIMENSIONs replaced with dynamic 
+ option to toggle extrapolation outside of convex hull added in IDSFFT and 
  IDBVIP.
  Because I don't know how to generate NAs in Fortran (I use g77 on Linux),
  I added a logical array MISSI, that indicates if a returned value should
  be NA. These values will be set to NA after the Fortran call.
+ option to handle duplicate data points added (according to an example in the 
  S-Plus help page)
+ man pages converted and rewritten
+ data set akima (from S-Plus) added 
+ function interpp() added, it evaluates the interpolated function at 
  arbitraryly choosen points and generates no regular grid as interp() does.
  There where some problems with interpp() when using the Fortran version:
   -   it crashes when compiled with "g77 -O2 -fpic" and called with more than 
       one output point.
   -   compilation with "g77 -g -fpic" fails (see src/Makefile for details)
   -   compilation with "g77 -g" works (and no crashes occur)
  These problems do not occur in the C Version (generated by f2c), so it would 
  be better to use only the src-c tree. 



After I finished the above steps I found a more recent version (ACM 761, 1996)
of Akimas interpolation code which uses the tripack package (also available at 
ACM as algorithm no. 751) for triangulation and now I'm trying to use it for
the next version of interp(). 


------------------------------------------------------------------
Albrecht Gebhardt           email: albrecht.gebhardt@uni-klu.ac.at
Institut fuer Mathematik    Tel. : (++43 463) 2700/837
Universitaet Klagenfurt     Fax  : (++43 463) 2700/834
Villacher Str. 161
A-9020 Klagenfurt, Austria
------------------------------------------------------------------

