Skip to content
Back to formatted view

Raw Message

Message-ID: <8b356f880903281357u7afe2e23kfc008e3f96309cff@mail.gmail.com>
Date: 2009-03-28T20:57:22Z
From: Stavros Macrakis
Subject: Sorting problem
In-Reply-To: <49CE0FC6.20000@stats.uwo.ca>

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