% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_indexing.R
\name{get_idx}
\alias{get_idx}
\alias{get.idx}
\title{Select Indices for a Chemical Shift Region}
\usage{
get_idx(range = c(1, 5), ppm)

get.idx(range = c(1, 5), ppm)
}
\arguments{
\item{range}{Numeric vector of length 2 specifying lower and upper bounds
(order does not matter).}

\item{ppm}{Numeric vector. The full chemical shift axis (in ppm).}
}
\value{
Integer vector of indices corresponding to \code{ppm} values within the given range.
}
\description{
Returns the indices of the chemical shift vector (\code{ppm}) that fall
within the specified range.
}
\examples{
data(covid_raw)
X <- covid_raw$X
ppm <- covid_raw$ppm
idx_tsp <- get_idx(c(-0.1, 0.1), ppm)
ppm[range(idx_tsp)]
plot(ppm[idx_tsp], X[1, idx_tsp], type = 'l')

}
\seealso{
Other NMR: 
\code{\link{.dynamicIntervalsMedian}()}
}
\concept{NMR}
