Find the elements of ppm that reside between to points

get_idx(sh, ppm)

Arguments

sh

The lower and upper bounds (2 numeric values) of the chemical shift region you wish to get the index for in ppm

ppm

The ppm variable matched to your X

Value

A numerical array of values that can be used to index both ppm and X to specify a region to visualise or work on

Details

get_idx() asks what ppm values are between the points specified in the arg sh and returns this as an array

See also

Other estimation: lw(), noise(), shift_pickr()

Examples

# You want to visualise the Creatinine peak in your spectra data(X, ppm) idx <- get_idx(sh = c(3, 3.1), ppm = ppm) plot(ppm[idx], X[1,idx], main = "The Creatinine Peak Found Using get_idx()", xlab = "Chemical Shift (ppm)", ylab = "Intensity", type = 'l')