Tinderbox v10 Icon

List/Set.avg()


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator in Current Baseline: 

Operator Last Altered: 

 Function  [other Function type actions]

 List  [operators of similar scope]

 Dictionary, Set & List operations  [other Dictionary, Set & List operations operators]

 v9.0.0

 Baseline

 As at baseline


Syntax note: Operators without any defined mandatory arguments may omit their empty closing parentheses


List/Set.avg()

List/set.avg

Returns the mean value of a list or set of numbers. For example, if MyList is a list of numerical values '3;4;8;3;9;2;12':

$MyNumber = $MyList.avg; returns 5.85714

To get only two decimal places:

$MyNumber = $MyList.avg.format("2"); returns 5.86