redisSPop: Remove and return an element from a set.

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

View source: R/setVal.R

Description

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

Usage

1
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

redisSAdd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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 documentation built on May 2, 2019, 2:02 p.m.