0

I want to interpolate some data and correct the interpolation using the root of the function betweent the two points. My data looks like this:

    P    t    h       date
1 754 12.0 2546 2018-04-05
2 732 10.8 2743 2018-04-05
3 700  8.2 3146 2018-04-05
4 657  4.8 3658 2018-04-05
5 648  4.0 3781 2018-04-05
6 643  5.0 3844 2018-04-05

I want to get something like this:

    P    t    h       date
1 754 12.0 2550 2018-04-05
2 732 11.9 2560 2018-04-05
3 700 11.8 2570 2018-04-05
4 657 11.7 2580 2018-04-05
5 648 11.6 2590 2018-04-05
6 643 11.5 2600 2018-04-05

Where using the first two samplepoints and the root of the lineal function between them i can fill the "t"data in steps of 10 in "h". And then repeat it for every date. Is there a simple function to reproduce this in R?

  • 1
    You have to post examples of those data frames for someone to answer your question – pogibas Oct 23 '17 at 19:51
  • See [how to create a reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). Include sample data in your question as well as the desired output for that input. Show the code you've tried so far and describe exactly where you are getting stuck. – MrFlick Oct 23 '17 at 20:10

0 Answers0