# NOT RUN {
r <- ri(5, 20, 100)
x <- as.which(r)
x
stopifnot(identical(x, as.which(as.logical(r))))
stopifnot(identical(x, as.which(as.bitwhich(r))))
stopifnot(identical(x, as.which(as.bit(r))))
# }
Run the code above in your browser using DataLab