This function calculates the retention time (RT) match score based on the RT error and the RT match tolerance. The score is calculated using a Gaussian-like function.

calculate_rt_match_score(RT.error, rt.match.tol = 30)

Arguments

RT.error

Numeric vector. The RT error values between experimental and reference RT values.

rt.match.tol

Numeric. The RT match tolerance in seconds. Default is 30.

Value

A numeric vector representing the RT match score for each RT error. The score is calculated using the formula: \(exp(-0.5 * (RT.error / rt.match.tol)^2)\).

Details

The RT match score is computed using a Gaussian-like function where the RT error is normalized by the RT match tolerance (`rt.match.tol`). Lower RT errors result in higher match scores.

Examples

if (FALSE) { # \dontrun{
# Example RT errors
rt_errors <- c(5, 10, 2, 25)

# Calculate RT match scores with a default tolerance of 30 seconds
scores <- calculate_rt_match_score(RT.error = rt_errors, rt.match.tol = 30)
print(scores)
} # }