...
Literal example:
d-codelang-syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: |
---|
| LISTAVERAGElistaverage([0,0,2,4,6,8,10,12,14,16,18,20]) as:'myArrayAvg' |
|
...
listaverage([0,0,2,4,6,8,10,12,14,16,18,20]) |
Output: Returns the average of all values in the literal array: 19.1667
.
Column example:
d-codelang-syntax |
---|
RawWrangle | true |
---|
Type | ref |
---|
showNote | true |
---|
WrangleText | derive type:single value: |
---|
| LISTAVERAGElistaverage(myArray) as:'myArrayAvg' |
|
listaverage(myArray) |
Output:
...
Returns the average of all values in the arrays of the myArray
column.
d-code-lang-syntax |
---|
RawWrangle | true |
---|
Type | syntax |
---|
showNote | true |
---|
WrangleText | derive type:single value: |
---|
| LISTAVERAGE |
listaverage(array_ref) |
Argument | Required? | Data Type | Description |
---|
array_ref | Y | Array | Array literal, reference to column containing arrays, or function returning an array |
...