redisSAdd: Add an element to a set.

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

View source: R/setVal.R

Description

Add the element to the specified set.

Usage

1
redisSAdd(set, element)

Arguments

set

The string set identifier.

element

The object to add to the set.

Details

If member is already a member of the set no operation is performed. If key does not exist a new set with the specified member as sole member is created. If the key exists but does not hold a set value an error is returned.

Value

TRUE if the element was successfully added, FALSE otherwise (including cases in which the element already belonged to the set).

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

redisSRem

Examples

1
2
3
4
5
## Not run: 
redisConnect()
redisSAdd("set", 5)

## End(Not run)

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