-
Notifications
You must be signed in to change notification settings - Fork 0
GREL Array Functions
Array functions supported by the OpenRefine Expression Language (GREL)
See also: All GREL functions.
Returns the length of array a.
Returns the sub-array of a from its index from up to but not including index to. If to is omitted, it is understood to be the end of the array a. For example, slice([ 0, 1, 2, 3, 4], 1, 3) returns [ 1, 2 ], and slice([ 0, 1, 2, 3, 4], 1) returns [ 1, 2, 3, 4 ].
See slice function above.
Reverses array a. For example, reverse([ 0, 1, 2, 3]) returns the array [ 3, 2, 1, 0 ].
Sorts array a in ascending order. For example, sort([ 2, 1, 0, 3]) returns the array [ 0, 1, 2, 3 ].
Return the sum of the numbers in the array a. For example, sum([ 2, 1, 0, 3]) returns 6.
Returns the string obtained by joining the array a with the separator sep. For example, join([ "foo", "bar", "baz" ], ";") returns the string foo;bar;baz.
Returns array a with duplicates removed. For example, uniques([ 2, 1, 2, 0, 1, 4, 3]) returns the array [ 0, 1, 2, 3, 4 ].