descendZero {xcms} | R Documentation |
Decends down the sides of a data peak and finds either the points greater than or equal to the zero intercept, the intercept with a given value, or the bottom of the first valley on each side.
descendZero(y, istart = which.max(y)) descendValue(y, value, istart = which.max(y)) descendMin(y, istart = which.max(y))
y |
numeric vector with values |
istart |
starting point for descent |
value |
numeric value to descend to |
An integer vector of length 2 with the starting and ending indicies of the peak start and end points.
Colin A. Smith, csmith@scripps.edu
normdist <- dnorm(seq(-4, 4, .1)) - .1 descendZero(normdist) normdist[descendZero(normdist)] descendValue(normdist, .15) normdist[descendValue(normdist, .15)] descendMin(normdist)