Learn R Programming

rredis (version 1.7.0)

redisLSet: Set a value within a list.

Description

Set the value of an element at the given index in a list corresponding to the specified key.

Usage

redisLSet(key, index, value)

Arguments

key
A key corresponding to a Redis list.
index
The index within the list of the element to write to.
value
The value to set.

Value

TRUE if successful, FALSE otherwise.

Details

Indices begin at zero. Out of range indices throw an error.

References

http://redis.io/commands

See Also

redisLPush

Examples

Run this code
## Not run: 
# redisConnect()
# redisLPush('list',pi)
# redisLSet('list',0,5)
# redisLIndex('list',0)
# ## End(Not run)

Run the code above in your browser using DataLab