[R] Interpolation between 2 vectors

2008-02-19 Thread Dani Valverde
Hello, I have two vectors, one with 13112 points and the other one with 10909. I wonder if there is a way to interpolate the data so the shorter vectors has the same number of points as the longer one. Best, Dani -- Daniel Valverde SaubĂ­ Grup de Biologia Molecular de Llevats Facultat de Veteri

Re: [R] Interpolation between 2 vectors

2008-02-19 Thread jim holtman
check out the 'approx' function. On Feb 19, 2008 12:44 PM, Dani Valverde <[EMAIL PROTECTED]> wrote: > Hello, > I have two vectors, one with 13112 points and the other one with 10909. > I wonder if there is a way to interpolate the data so the shorter > vectors has the same number of points as the

Re: [R] Interpolation between 2 vectors

2008-02-20 Thread Dani Valverde
Hello, I tried the approx() and it worked. Now, I have a list named "interpol" resulting from the interpolation. I would like to append the values in interpol$y in the position specified by interpol$x in a existing vector "spect1". I tried with append() and the following code: spect1 <- c(1:109