I am given x = c(50, 37, 25, 0) and y = c(30, 52, 65, 70). These are vectors containing the x and y coordinates of four points. I need to draw a smooth curve through all four points, and get the actual equation for this function.
How do I accomplish this with R?
I was reading the documentation for splines but given my lack of familiarity with the mathematics behind this, I got pretty confused.
You have to do a third degree polynom and than add a curve to the plot