[R] Sorting problem
Stavros Macrakis
macrakis at alum.mit.edu
Sat Mar 28 21:57:22 CET 2009
On Sat, Mar 28, 2009 at 7:53 AM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> ...More generally, the xtfrm() function converts a vector into a numeric one that sorts in the same order. ...
Thanks, I learn a lot just by reading the answers to other people's
questions on this list.
Some followup questions:
1) Where does the name 'xtfrm' come from?
2) Why isn't xtfrm of a numeric vector the identity function?
3) Similarly, why isn't xtfrm of a logical vector just as.integer of
it? (as it is for factors)
4) Why is xtfrm(c(2,3,2)) => c(1,3,1) and not c(1,2,1) or for that
matter c(2,3,2) (see point 2)?
Thanks,
-s
More information about the R-help
mailing list