[R] interp.surface on data frames

Xavier.Abulker@fimat.com Xavier.Abulker at fimat.com
Thu Jun 20 16:48:58 CEST 2002


Hello R Group

I'm trying to apply the function interp.surface of the following data frame
and it doesn't work

 x value is
$Strike
[1] 100 102

y Value is
$Maturity
[1] 25 35

z Value is
 ImplVol.100 ImplVol.102
1    0.419177    0.331999
2    0.264417    0.195447

I want to find the value of z for (x,y)=(101,30)

Now I apply
obj<- list( x=x, y=y, z=z)

I define

make.surface.grid( list(c(101,30),c(101,30)))-> loc  (I want to interpolate
for (x,y)=(101,30))

and
interp.surface( obj, loc)-> look gives me an error.

could you tell me where I'm wrong?
Thanks








-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list