redisLIndex: Retrieve a value from a Redis 'list.'

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

View source: R/listCMD.R

Description

Retrieve a value from a Redis 'list' at the specified index without removing it from the list.

Usage

1
redisLIndex(key, index, ...)

Arguments

key

The key (whose value is of the type 'list').

index

The list index to retrieve.

...

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

Details

List indices begin at 0. Negative indexes are supported, for example -1 is the last element, -2 the penultimate and so on. If the value stored at key is not of the 'list' type an error is returned. If the index is out of range an empty string is returned.

Value

The corresponding value or an empty string if the index is out of bounds.

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

redisLPop

Examples

1
2
3
4
## Not run: 
redisConnect()

## End(Not run)

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