Description Usage Arguments Examples
This function returns a vector of indices of the first occurence of each unique element of a provided vector.
1 | first_unique(redundantvec)
|
redundantvec |
The vector with repeated values. N.B. Providing a vector with no repeated values will return the equivalent of 1:length(redundantvec). |
1 2 3 4 5 6 | arbitraryvec <- c(1:5, rep(c(6, 7), times = 3), 8:10)
length(arbitraryvec)
[1] 14
first_unique(arbitraryvec)
[1] 1 2 3 4 5 6 7 12 13 14
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.