rank returns the sample ranks of the values in x. Ties result in ranks being averaged. NA values are not allowed in this function.
rank
x
NA
rank(x)