tiepos | R Documentation |
tiepos
returns the positions of those elements that participate in ties.
tiepos(x, ...)
## S3 method for class 'integer64'
tiepos(x, nties = NULL, method = NULL, ...)
x |
a vector or a data frame or an array or |
nties |
NULL or the number of tied values (including NA). Providing |
method |
NULL for automatic method selection or a suitable low-level method, see details |
... |
ignored |
This function automatically chooses from several low-level functions considering the size of x
and the availability of a cache.
Suitable methods are sortordertie
(fast ordering)
and ordertie
(memory saving ordering).
an integer vector of positions
Jens Oehlschlägel <Jens.Oehlschlaegel@truecluster.com>
rank.integer64
for possibly tied ranks and unipos.integer64
for positions of unique values.
x <- as.integer64(sample(c(rep(NA, 9), 1:9), 32, TRUE))
tiepos(x)
stopifnot(identical(tiepos(x), (1:length(x))[duplicated(x) | rev(duplicated(rev(x)))]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.