repl.txt (1119B)
1 2 {{alias}}() 3 Returns an accumulator function which incrementally computes a statistical 4 summary. 5 6 If provided a value, the accumulator function returns an updated summary. If 7 not provided a value, the accumulator function returns the current summary. 8 9 The returned summary is an object containing the following fields: 10 11 - count: count. 12 - max: maximum value. 13 - min: minimum value. 14 - range: range. 15 - midrange: mid-range. 16 - sum: sum. 17 - mean: arithmetic mean. 18 - variance: unbiased sample variance. 19 - stdev: corrected sample standard deviation. 20 - skewness: corrected sample skewness. 21 - kurtosis: corrected sample excess kurtosis. 22 23 For long running accumulations or accumulations of large numbers, care 24 should be taken to prevent overflow. 25 26 Returns 27 ------- 28 acc: Function 29 Accumulator function. 30 31 Examples 32 -------- 33 > var accumulator = {{alias}}(); 34 > var s = accumulator() 35 {} 36 > s = accumulator( 2.0 ) 37 {...} 38 > s = accumulator( -5.0 ) 39 {...} 40 > s = accumulator() 41 {...} 42 43 See Also 44 -------- 45