This version is out of date, covering development from v9.0.0 to v9.3.0. It is maintained here only for inbound reference links from elsewhere. It is no longer actively updated.

Jump to the current version of aTbRef

Tinderbox v9 Icon

List/Set.avg


Operator Type: 

Operator Scope of Action: 

Operator Purpose: 

Operator First Added: 

Operator Altered: 

 Function   [other Function type actions]

 List   [operators of similar scope]

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

 9.0.0

 


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