[R] (no subject)

2006-10-27 Thread Daniel Halligan
, -2894.038, -2894.038)) I need to approximately calculate the two points when max(dat$LogL) - dat$LogL = 2. Does anyone know how this can be done, using approxfun or any other method? Any help greatly appreciated. Dan Halligan Daniel

[R] Linear interpolation to calculate x when y=0

2006-10-27 Thread Daniel Halligan
I have approximated a function y = f(x) by sampling at different values of x. The curve produced by joining up the points crosses y=0 zero at two points, which are within the range of x values sampled and I would like to estimate (approximately) the x values at these points. I think this