repl.txt (956B)
1 2 {{alias}}( [mx, my] ) 3 Returns an accumulator function which incrementally computes the absolute 4 value of the sample Pearson product-moment correlation coefficient. 5 6 If provided values, the accumulator function returns an updated accumulated 7 value. If not provided values, the accumulator function returns the current 8 accumulated value. 9 10 If provided `NaN` or a value which, when used in computations, results in 11 `NaN`, the accumulated value is `NaN` for all future invocations. 12 13 Parameters 14 ---------- 15 mx: number (optional) 16 Known mean. 17 18 my: number (optional) 19 Known mean. 20 21 Returns 22 ------- 23 acc: Function 24 Accumulator function. 25 26 Examples 27 -------- 28 > var accumulator = {{alias}}(); 29 > var ar = accumulator() 30 null 31 > ar = accumulator( 2.0, 1.0 ) 32 0.0 33 > ar = accumulator( -5.0, 3.14 ) 34 ~1.0 35 > ar = accumulator() 36 ~1.0 37 38 See Also 39 -------- 40