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?