List Processing (Part 6) – Other

ARRAY_LENGTH

Definition: ARRAY_LENGTH(Array $list)

This function will return the length of the input array.

Example

Where $list :=

28

ARRAY_LENGTH($list) will evaluate to 4.

ARRAY_CONCAT

Definition: ARRAY_CONCAT(Array $list1, Array $list2)

ARRAY_CONCAT function for joining arrays together.

Example

Where $list  1 :=

29

Where $list2 :=

30

ARRAY_CONCAT($list1, list2) will evaluate to:

31

RANGE

Definition: RANGE(Number $start, Number $count)

This function is to create an array populated sequence of numbers starting at $start, of length $count. A key use of this function is to generate an array of a specific length, to then ARRAY_SELECT across.

RANGE function will create a new array with a given length.

Example

RANGE(2, 3) results in:

32

ARRAY_TRANSPOSE

Definition: ARRAY_TRANSPOSE(Array(of Array) $2darray)

This function will take an array of this form:

33

And swap columns with rows:

 

34

Which is actually the same data structure as this:

35

You can use the same function to swap back:

 

36

Related Articles