example R spline interpolation