sort_array {SparkR}R Documentation

sort_array

Description

Sorts the input array for the given column in ascending order, according to the natural ordering of the array elements.

Usage

## S4 method for signature 'Column'
sort_array(x, asc = TRUE)

sort_array(x, asc = TRUE)

Arguments

x

A Column to sort

asc

A logical flag indicating the sorting order. TRUE, sorting is in ascending order. FALSE, sorting is in descending order.

Note

sort_array since 1.6.0

See Also

Other collection_funcs: array_contains, array_contains, array_contains,Column-method; explode, explode, explode,Column-method; posexplode, posexplode, posexplode,Column-method; size, size, size,Column-method

Examples

## Not run: 
##D sort_array(df$c)
##D sort_array(df$c, FALSE)
## End(Not run)

[Package SparkR version 2.0.2 Index]