Re: [R] insert() function

2008-02-21 Thread Dani Valverde
Great! Now it works. Many thanks. Dani Daniel Valverde Saubí Grup de Biologia Molecular de Llevats Facultat de Veterinària de la Universitat Autònoma de Barcelona Edifici V, Campus UAB 08193 Cerdanyola del Vallès- SPAIN Centro de Investigación Biomédica en Red en Bioingeniería, Biomateriales y

Re: [R] insert() function

2008-02-21 Thread Henrik Bengtsson
> spect2 <- insert(spect1, ats=pos, values=as.list(intensities)) > str(spect2) num [1:13112] -0.457 -0.457 0.300 1.781 -0.381 ... /Henrik On Thu, Feb 21, 2008 at 9:26 AM, Henrik Bengtsson <[EMAIL PROTECTED]> wrote: > On Thu, Feb 21, 2008 at 4:30 AM, Dani Valverde <[EMAIL PROTECTED]> wrote: >

Re: [R] insert() function

2008-02-21 Thread Henrik Bengtsson
On Thu, Feb 21, 2008 at 4:30 AM, Dani Valverde <[EMAIL PROTECTED]> wrote: > Hello, > I still having problems with insert() from R.utils package. I provide a > code with no error: > > x <- seq(1:10909) > x1 <- c(13112-10909) > spect1 <- rnorm(10909) > > interpol <- approx(x,spect1,xout=c(seq(fro

Re: [R] insert() function

2008-02-21 Thread Dani Valverde
Hello, I still having problems with insert() from R.utils package. I provide a code with no error: x <- seq(1:10909) x1 <- c(13112-10909) spect1 <- rnorm(10909) interpol <- approx(x,spect1,xout=c(seq(from=1, by=((10909 - 1)/(x1 -1)), length.out=x1))) pos <- round(interpol$x,0) intensities <- inte

Re: [R] insert() function

2008-02-20 Thread Henrik Bengtsson
Hi. On Feb 20, 2008 2:38 AM, Dani Valverde <[EMAIL PROTECTED]> wrote: > Hello, > I am trying to insert a certain number of points into a certain position > of a vector with this code: > x <- seq(1:10909) > x1 <- c(13112-10909) > spect1 <- rnorm(13112) > interpol <- approx(x,spect1,xout=c(seq(from=

[R] insert() function

2008-02-20 Thread Dani Valverde
Hello, I am trying to insert a certain number of points into a certain position of a vector with this code: x <- seq(1:10909) x1 <- c(13112-10909) spect1 <- rnorm(13112) interpol <- approx(x,spect1,xout=c(seq(from=1, by=((10909 - 1)/(x1 - 1)), length.out=x1))) pos <- round(interpol$x,0) intensiti