search for: spect2

Displaying 1 result from an estimated 1 matches for "spect2".

Did you mean: spec2
2008 Feb 20
1
insert() function
...ain 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) intensities <- interpol$y spect2 <- insert(spect1,ats=pos,values=intensities) "interpol" object is the result of interpoling the missing x values with respect to spect1. "pos" object is a vector with the indexes where the values are to be placed (it is the rounded values of interpol$x) and "intensit...