Learn R Programming

rredis (version 1.7.0)

redisSCard: Set cardinality

Description

Return the number of elements contained in the specified set.

Usage

redisSCard(set)

Arguments

set
A string set identifier.

Value

The function returns an integer corresponding to the number of elements in the set. Zero is returned if the set is empty or if the set does not exist.

References

http://redis.io/commands

See Also

redisSAdd

Examples

Run this code
## Not run: 
# redisConnect()
# redisSAdd("set",5)
# redisSCard("set")
# ## End(Not run)

Run the code above in your browser using DataLab