Re: [R] Help on a code

2013-02-26 Thread William Dunlap
ehalf > Of Andras Farkas > Sent: Tuesday, February 26, 2013 1:21 PM > To: r-help@r-project.org > Subject: [R] Help on a code > > Dear List, > > I have the following code: > > x <-c(0, 13.8, 38.16667, 62.16667, > 85.91667, > 108.9

Re: [R] Help on a code

2013-02-26 Thread Ista Zahn
Hi Andras, This may be too simplistic, but how about with(Interpolated, x[y==2][1]) ? On Tue, Feb 26, 2013 at 4:21 PM, Andras Farkas wrote: > Dear List, > > I have the following code: > > x <-c(0, 13.8, 38.16667, 62.16667, > 85.91667, 108.9167) > y

[R] Help on a code

2013-02-26 Thread Andras Farkas
Dear List,   I have the following code:   x <-c(0, 13.8, 38.16667, 62.16667, 85.91667, 108.9167) y <-c(1.77, 2.39, 3, 2.65, 2.62, 1.8) Interpolated <- approx(x, y,xout=0:tail(x, n=1),method="linear") plot(Interpolated)   in this code x is time in hours (