Linear interpolation in R

前端 未结 2 759
半阙折子戏
半阙折子戏 2021-02-05 10:23

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         


        
2条回答
  •  Happy的楠姐
    2021-02-05 10:48

    You could be looking at approx() and approxfun() ... or I suppose you could fit with lm for linear or lowess for non-parametric fits.

提交回复
热议问题