Hi Lionel,
Your choice of variable names is a bit odd (the roles of x and y seem to be
reversed from the usual.)
Assuming that you are looking for linear interpolation (in spite of the
subject of your email),
does the following give you what you need?
u1 <- approx(x=y1,y=x1,xout=y)
u2 <- approx(x=
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
2 matches
Mail list logo