get_idx.Rd
get_idx()
finds which ppm elements are within certain bounds provided in the argument 'r'.
get_idx(r, p)
r | the lower and upper bounds of the ppm region you wish to find the indexes of |
---|---|
p | the ppm variable you want to find the indexes of |
An array containing the indexes between the lower and upper bounds
The ppm variable matched to a spectrum indicates at what frequency the peak resides. To look at x values between certain frequencies, ask get_idx()
to find what columns of x are between the frequency values.
For instance, to find the values of creatinine (which resides between ppm 3 and 3.1) in your x variable, input 3 and 3.1 into get_idx()
and provide the ppm variable p.
From there, get_idx()
asks what ppm values are both above the lower ppm of 3 and below the upper ppm of 3.1. These ppm values are then returned as the output of get_idx()
.
Torben Kimhofer torben.kimhofer@murdoch.edu.au
Kyle Bario kylebario1@gmail.com