spline(x, y, n = <<see below>>, periodic = F, boundary = 0, xmin = min(x), xmax = max(x))
When interpolating a number of points, a spline can be a much better solution than a polynomial interpolation, since the polynomial can oscillate wildly in order to hit all of the points (polynomials fit the data globally while splines fit the data locally).
Hamming, R. W. (1973). Numerical Methods for Scientists and Engineers, 2nd ed. McGraw-Hill, New York.
x <- 1:20; y <- sin(x) plot(x, y); lines(spline(x, y))