Nothing
mzRTindexer <- function(MZvec, RTvec, MZref, RTref, massAccuracy, RTtolerance) {
##
measuredRTdiff <- abs(RTvec - RTref)
measuredMassDiff <- abs(MZvec - MZref)
indexRefVec <- which((measuredMassDiff <= massAccuracy) & (measuredRTdiff <= RTtolerance))
##
LindexRefVec <- length(indexRefVec)
if (LindexRefVec > 0) {
if (LindexRefVec > 1) {
##
if (max(measuredMassDiff[indexRefVec]) == 0) {
xMin <- which.min(measuredRTdiff[indexRefVec])
} else if (max(measuredRTdiff[indexRefVec]) == 0) {
xMin <- which.min(measuredMassDiff[indexRefVec])
} else {
xMin <- which.min(measuredMassDiff[indexRefVec]*measuredRTdiff[indexRefVec])
}
##
indexRefVec <- indexRefVec[xMin[1]]
}
##
} else {
indexRefVec <- NULL
}
##
return(indexRefVec)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.