This internal function is called by quantify_ions(). It

  • converts rt_limits to a data frame (since it may be a numeric vector with two elements or a list).

  • replaces any infinite value with the minimum or maximum retention time.

  • finds the scan indices enclosed by the retention time limits. If a retention time window does not include any scans, scan indices are NA.

find_rt_limits(ms_header, rt_limits)

Arguments

ms_header

Header of an mzR object, possibly pre-filtered for MS1 scans.

rt_limits

Value of the correspondent argument of quantify_ions().

Value

A data frame with one row per retention time window and the calculated retention time limits and scan indices in columns rt_min, rt_max, and scans, respectively.