calculate_rt_match_score | R Documentation |
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)
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. |
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.
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)
.
## Not run:
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.