data(CuticleIR)
sumSpectra(CuticleIR) # note the frequency range & existing gap
# remove frequencies from one end:
newIR <- removeFreq(CuticleIR, rem.freq = CuticleIR$freq > 3500)
# remove frequencies from both ends at once:
newIR <- removeFreq(CuticleIR, rem.freq = CuticleIR$freq > 3500
| CuticleIR$freq < 800)
# remove frequencies from the middle:
newIR <- removeFreq(CuticleIR, rem.freq = CuticleIR$freq > 800
& CuticleIR$freq < 1000)
# after any of these, inspect the results:
sumSpectra(newIR)
check4Gaps(newIR$freq, newIR$data[1,], plot = TRUE)Run the code above in your browser using DataLab