R/peak_calculations.R
iso_combine_raw_data_with_peak_table.Rd
This function combines chromatogram and peak table information and is used internally in several plotting and peak table calculation functions. Usually it is not called directly by the user but may be of use for extending functionality and is hence provided as a stand-alone function.
iso_combine_raw_data_with_peak_table( raw_data, peak_table, file_id = default(file_id), data_trace = NULL, rt = default(rt), rt_start = default(rt_start), rt_end = default(rt_end), rt_unit = NULL )
raw_data | the raw chromatographic data. If in long format, |
---|---|
peak_table | a data frame that describes the peaks in this chromatogram. Peaks must have at minimum an apex retention time or a start and end retention time (ideally all 3). If no apex retention time is provided, peak marker points cannot be identified. If not both start and end retention time are provided, peak start and end are identified to lie right before and after the apex point. |
file_id | the column (or columns) that uniquely identifies individual analyses for proper matching of the raw chromatography data with the peak_table data. In most cases dealing with isoreader data, the default ( |
data_trace | expression to identify individual data traces for raw data in long format. This is not usually needed for calculations but can be useful when working with data frames already gathered for plotting. If the data is indeed in gathered (long) format, and this is not set correctly, peak table data is integrated across all traces in the raw data leading to unpredictable peak border and apex identifications. |
rt | the column in the |
rt_start | the column in the |
rt_end | the column in the |
rt_unit | which time unit the retention time columns ( |