Description Usage Arguments Value Examples
Pad indices to left or right
1 2 3 4 5 | pad_idx_left(idx, start = 1L)
pad_idx_right(idx, end = NA)
pad_idx(idx)
|
idx |
a vector of indices |
start |
left most index |
end |
right most index |
a vector of padded indices
1 2 3 4 | n = 1000
xi <- sort(sample(seq(n), 100))
xleft <- pad_idx_left(xi)
xright <- pad_idx_right(xi, n)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.