From 6f6e5629395b339abe9b310399af656dc765b3fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Todor=20Kondi=C4=87?= <todor.kondic@uni.lu> Date: Tue, 30 Jun 2020 13:22:34 +0200 Subject: [PATCH] api: Add comment * R/api.R(mk_tol_funcs): Add description in comment. --- R/api.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/R/api.R b/R/api.R index 43a4cb3..29b45a8 100644 --- a/R/api.R +++ b/R/api.R @@ -180,6 +180,16 @@ concurrency <- function(m) { } mk_tol_funcs <- function(m) { + ## Depending on units given when the user specified the errors, + ## generate functions that calculate errors given the concrete + ## mass. + + ## Mass errors can be either in ppm, or Da. + ## Time errors in min, or s. + + ## The mass error calculation functions and the retention time + ## error in minutes are in m$extr$tol. + grab <- function(entry,unit) { what <- paste0("\\<",unit,"\\>$") entry <- trimws(entry,which="both") -- GitLab