Description Usage Arguments Details Value Author(s) See Also Examples
Returns the sample ranks of the values in a vector. Values are treated as ties if difference < tolerance.
1 |
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. |
ties.method |
a character string specifying how ties are treated, see rank; can be abbreviated. |
tolerance |
numeric = 0. Differences smaller than tolerance are not considered. |
The function 'rank' (package 'base') only recognizes ties if values are *exactly* equal, ie. it behaves like '==' instead of 'all.equal'. 'Rank' behaves like 'all.equal', recognizing values as ties if the difference is less than 'tolerance' (or thereabouts!)
A numeric vector of the same length as x with names copied from x (unless na.last = NA, when missing values are removed). The vector is of integer type unless ties.method = "average" when it is of double type (whether or not there are any ties).
Mike Meredith, 7 Sept 2007
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.