.get_actual_index | R Documentation |
Convert negative indices to positive ones. Use the convention that
vec[[-1L]]
signifies the last element of vec
, vec[[-2L]]
signifies the second-to-last element of vec
, and so on. 1-based
indexing is assumed. Values of zero, or out-of-range indices, will be
rejected.
.get_actual_index(index, length)
index |
Integer; the index to normalize. |
length |
Integer; the length of the vector or list we are indexing. |
The "actual" integer index, between 1 and length
, inclusive.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.