I have a dataset of real data, for example looking like this:
# Dataset 1 with known data known <- data.frame( x = c(0:6), y = c(0, 10, 20, 23, 41, 39
You could be looking at approx() and approxfun() ... or I suppose you could fit with lm for linear or lowess for non-parametric fits.
approx()
approxfun()
lm
lowess