Skip to content
Prev 278097 / 398506 Next

count ties after rank?

On Mon, Nov 21, 2011 at 11:36 AM, Hao, Zhaozhe <haozhaozhe at ou.edu> wrote:
If you just need the overall number of ties in a vector (say x), you
can get it by

nTies = length(x) - length(unique(x))

This will not work if missing data are present, so you will have to
remove those first.

HTH,

Peter