Validate indices
Computes validated positive indices from given indices.
validateIndices(idxs = NULL, maxIdx, allowOutOfBound = TRUE)
Returns a validated integers list indicating the indices.
idxs <- validateIndices(c(-4, 0, -3, -1), 5) # [2, 5] idxs <- validateIndices(c(4, 4, 8, 2, 3), 8) # [4, 4, 8, 2, 3]
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.