[R] Extrapolate x values from a defined y sequence

lionel sicot ptit_bleu @ending from y@hoo@fr
Mon Jan 14 13:14:22 CET 2019


Hello,
I have two sets of measurement :with the same x sequence :x1<-1:10y1<-c(5,4.6,4.4,4.2,4,3.8,3.7,3.6,3,1)
x2<-1:10y2<-c(5,4.8,4.6,4.4,4.1,4,3.8,3.6,2.8,1)
I would like to sum these two curves in terms of x for a given sequence of y (for example : y<-c(5,4.5,4,3.5,3,2.5,2,1.5,1)), that is to determine for each y, an x1' from x1 and an x2' from x2 corresponding to y so that I can plot y as a function of (x1'+x2').
I hope it is clear enough.
I think I can do it with a loop an some non-conventional R script (I'm not a computer scientist) but i'm pretty sure that there is an elegant way to do it with R.
It will be very kind if someone can give me some R functions to do it.Thanks in advance,Ptit Bleu.




	[[alternative HTML version deleted]]



More information about the R-help mailing list