hasKey {listArray}R Documentation

hasKey

Description

Checks if a specific index exists

Usage

hasKey(x, ...)

Arguments

x

listArray object

...

index to check

Value

logical: TRUE index exists, FALSE index exists not

Examples

l <- listArray()
l[1] <- 1
hasKey(l, 1)
l[2,3] <- "test"
hasKey(l, 2, 3)
l[2:3] <- "vector"
hasKey(l, 2:3)
l['iris'] <- iris
hasKey(l, iris) # FALSE
l[mean] <- mean
hasKey(l, mean)
# if you have not stored NULL objects in your listArray
is.null(l[mean])
is.null(l[iris])

[Package listArray version 0.1.1 Index]