[R] Sorting problem
Stavros Macrakis
macrakis at alum.mit.edu
Sun Mar 29 20:14:26 CEST 2009
On Sun, Mar 29, 2009 at 6:15 AM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote:
> On 28/03/2009 4:57 PM, Stavros Macrakis wrote:
>> On Sat, Mar 28, 2009 at 7:53 AM, Duncan Murdoch <murdoch at stats.uwo.ca>
>> wrote:
>> 1) Where does the name 'xtfrm' come from?
> I don't know.
Hmm. If the origins of the name are lost in the mists of history,
perhaps a more mnemonic/intuitive one could be found?
>> 2) Why isn't xtfrm of a numeric vector the identity function?
>
> "Because the implementation does that". It's a one liner:...
Yes, I was asking *why* the implementation does that.
> The identity function would probably be faster, but why optimize cases that are never needed?
> A better optimization would be just to use order(x), not order(xtfrm(x)).
Why should the *calling* function have the burden of type dispatching?
-s
More information about the R-help
mailing list