Computes the lag-k auto-correlation for the supplied array lag must be greater than or equal to 0 and less than x.size. lag = 0 always returns 1.0 The array x must have 2 or more elements. If you need multiple values for different lags, then using autoCorrelations() is more efficient.