require(graphics)
ispl <- polySpline(interpSpline( weight ~ height, women, bSpline = TRUE))
print( ispl ) # print the piecewise polynomial representation
plot( ispl ) # plots over the range of the knots
points( women$height, women$weight )
Run the code above in your browser using DataLab