Returns the dense ranks of the values in a vector.
DenseRank gives the ranking within the vector x, but the ranks are consecutive. No ranks are skipped if there are ranks with multiple items. (Unlike rank gives the ranking within the vector x too, but ties are assigned the same rank, with the next ranking(s) skipped.)
Usage
DenseRank(x, na.last = TRUE)
Arguments
x
a numeric, complex, character or logical vector.
na.last
for controlling the treatment of NAs. If TRUE, missing values in the data are put last; if FALSE, they are put first; if NA, they are removed; if "keep" they are kept with rank NA.
Value
na.last = NA, when missing values are removed). The vector is of integer type unless x is a long vector.