sneumann/xcms — pull request #4 by ColeWunderlich (2014-06-06 04:44:54+00:00)
Title: Bug fix for Rt and Mz min thresholds suggested by J Stanstrup

Incorporates expansion and min width thresholds for peak Mz and Rt as suggested by J Stanstrup. I would have just added this to her pull request but I couldn't figure out how. Fixes a bug that occurred when only one peak needs Mz or Rt width expansion. This bug was due to the fact that a 1 dimensional array is passed to rowMeans() when only one peak needs expansion. This causes rowMeans() to throw an error and terminate execution because it requires its input to have at least two dimensions.
Example:
Error in rowMeans(peakrange[idx.expand.rt, c("rtmin", "rtmax")]) :
'x' must be an array of at least two dimensions