How to use the mean function from ramda

Find comprehensive JavaScript ramda.mean code examples handpicked from public code repositorys.

7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
 * @param {Array} list
 * @return {Number}
 * @example
 *
 *      R.mean([2, 7, 9]); //=> 6
 *      R.mean([]); //=> NaN
 */
var mean = _curry1(function mean(list) {
    return sum(list) / list.length;
});
fork icon0
star icon0
watch icon0

+ 35 other calls in file

9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
* @since v0.14.0
* @category Math
* @sig [Number] -> Number
* @param {Array} list
* @return {Number}
* @see R.mean
* @example
*
*      R.median([2, 9, 7]); //=> 7
*      R.median([7, 2, 10, 9]); //=> 8
fork icon0
star icon0
watch icon2

+ 11 other calls in file

Other functions in ramda

Sorted by popularity

function icon

ramda.clone is the most popular function in ramda (30311 examples)