powered by
Checks if an object is a list of indices ie vectors of one or more positive integer values.
chk_indices(x, x_name = NULL)vld_indices(x)
vld_indices(x)
The chk_ function throws an informative error if the test fails.
chk_
The vld_ function returns a flag indicating whether the test was met.
vld_
An object.
A string of the name of object x or NULL.
vld_indices(): Validate Indices
vld_indices()
x <- list(c(2L, 1L)) chk_indices(x) y <- c(2L, 1L) try(chk_indices(y)) vld_indices(c(3L, 1L)) vld_indices(list(c(3L, 1L)))
Run the code above in your browser using DataLab