In R 2.9.1/Windows, ? rank says: Usage: rank(x, na.last = TRUE, ties.method = c("average", "first", "random", "max", "min")) Arguments: ... ties.method: a character string specifying how ties are treated, see 'Details'; can be abbreviated.
This appears contradictory -- the default value is a vector of strings, while the argument specification requires a single string. Looking at the code for `rank` shows what is going on -- by using `match.arg`, `rank` is treating this default value as the list of legal argument values, not as the default value. The default is in fact the first value, "average". I suspect that this convention is documented somewhere (where?), but I think it would be useful to make it explicit in the documentation for `rank`. -s ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel