Learn R Programming

rredis (version 1.7.0)

redisSort: redisSort

Description

Sort a list, set or sorted set (zset).

Usage

redisSort(key, decreasing = FALSE, alpha = FALSE, by = NULL, start = NULL, count = NULL, get = NULL, store = NULL, ...)

Arguments

key
The key name of the list, set or zset to be sorted.
decreasing
Set the direction of the sort.
alpha
Lexicographically sort if true, otherwise try numeric sorting.
by
The BY option takes a pattern that is used in order to generate the key names of the weights used for sorting. Weight key names are obtained substituting the first occurrence of * with the actual value of the elements on the list. See the Redis documentation for examples.
start
Starting index of the sort.
count
Number of entries past start to use for the sort.
get
Retrieve external keys. See the Redis documentation.
store
Store the results in the specified key.
...
Optional additional arguments. Specify raw=TRUE to skip de-serialization of the data.

Value

A list of sorted values, unless store is specified in which case the results are stored in the specified key and TRUE is returned.

Details

Sort the elements contained in the List, Set, or Sorted Set value at key. By default sorting is numeric with elements being compared as double precision floating point numbers.

References

http://redis.io/commands