Select indices of the chemical shift array taht corresponding to a chemical shift region

get.idx(range = c(1, 5), ppm)

get_idx(range = c(1, 5), ppm)

Arguments

range

num array(2), range of chemical shift

ppm

num array, chemical shift vector

Value

array int, indices of ppm for shift range

NA

See also

Author

torben.kimhofer@murdoch.edu.au

Examples

load(covid)
#> Error in load(covid): object 'covid' not found
idx_tsp=get_idx(c(-0.1, 0.1), ppm) ppm[range(idx_tsp)]
#> [1] 0.09999952 -0.09983441
plot(ppm[idx_tsp], X[1,idx_tsp], type='l')