Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

redisSPop

Remove and return an element from a set.


Description

Remove and return an element, chosen at random, from the specified set.

Usage

redisSPop(set, ...)

Arguments

set

The set name (character).

...

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

Value

A random element of the set, or NULL if the set is empty or does not exist.

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

Examples

## Not run: 
redisConnect()
redisSAdd('set',runif(2))
redisSAdd('set',runif(3))
redisSAdd('set',runif(4))
redisSPop('set')
redisSPop('set')
redisSPop('set')
redisSPop('set')

## End(Not run)

rredis

"Redis" Key/Value Database Client

v1.7.0
Apache License (>= 2.0)
Authors
B. W. Lewis
Initial release
2015-07-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.