Elaborating results of targeted analyses
get_targeted_elaboration.Rd
Given a tables containing data from targeted analyses, including a calibration curve, it calculates the concentrations in unknown samples. and moooore
Arguments
- data_intensity
a dataframe containing the intensity area of each peak, with each row corresponding to a sample, and each column to an analysed molecule. The first column must contain the name of the samples, all other columns the intensities.
- data_legend
a dataframe in which the first column must be equal to the first column of data_intensity; the second column contains the samply_type, i.e.: "blank", "curve", "qc", or "unknown"; the following columns contain, for each targeted compound, the actual values for the curve and qc.
- compound_legend
either NULL or a dataframe with up to four columns: the first column contains the targeted molecules; the second column contains the relative matched internal standard (or NAs); the third column contains the weighting factor, i.e. either "none" (or NA) or the operation to perform to X and/or Y for calculating the weighting factors for the linear models, X and Y must be in uppercase (examples: "1/X", "1/(X^2)", "1/Y", "1/sqrt(Y)"); the fourth column contains the unit of mesure of the concentrations (only for reference and for later visualisation, not used for any calculation).
Value
a list with 5 tibbles and 1 list: results_concentrations, the table with the results; results_accuracy, the table with the accuracies (expressed as % of the theoretical value); cv_internal_standards, the table with the variation cofficients (%) of the internal standards; compound_legend, the same table provided in the argument compound_legend; summary_regression_models, a table with the slopes, intercepts, r.squared, and adj.r.squared; regression_models, a list containing all the computed linear models.