redisSRandMember: Choose a random element from a set

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/setVal.R

Description

Select and return an element of a set at random.

Usage

1

Arguments

set

The set key name (character).

...

Optional additional arguments. Specify raw=TRUE to skip de-serialization of the data.

Value

An element from the set selected randomly. An error is thrown if the set does not exist.

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

redisSAdd

Examples

1
2
3
4
5
6
7
8
## Not run: 
redisConnect()
redisSAdd('set',1)
redisSAdd('set',2)
redisSAdd('set',3)
redisSRandMember('set')

## End(Not run)

rredis documentation built on May 2, 2019, 2:02 p.m.