Peak-Picking

shift_pickr(X, ppm = NULL, sh = c(3, 3.1), pm = 0.005)

Arguments

X

The X array or matrix you want to pick the peak of

ppm

The column matched ppm variable to your X

sh

The chemical shift region you want to search

pm

The amount you want to add to each side of the peak

Value

The ppm variables that match the peak you are searching for

See also

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

Examples

data(X) idx <- shift_pickr(X[1,], ppm, sh = c(4,4.1), pm = 0.005)
#> Error in get_idx(c(p[m] - pm, p[m] + pm), p): Please provide only two (2) integers in the argument sh
idx1 <- shift_pickr(X[2,], ppm, sh = c(4,4.1), pm = 0.01)
#> Error in get_idx(c(p[m] - pm, p[m] + pm), p): Please provide only two (2) integers in the argument sh
plot(ppm[idx], X[1,idx], main = "Creatinine Peak 4.05", type = 'l', xlim = c(4.05, 4.07))
#> Error in plot(ppm[idx], X[1, idx], main = "Creatinine Peak 4.05", type = "l", xlim = c(4.05, 4.07)): object 'idx' not found
points(ppm[idx1], X[2,idx1], type = 'l', col = 'red')
#> Error in points(ppm[idx1], X[2, idx1], type = "l", col = "red"): object 'idx1' not found