From Waclaw.Marcin.Kusnierczyk at idi.ntnu.no  Mon Jun  1 16:30:01 2009
From: Waclaw.Marcin.Kusnierczyk at idi.ntnu.no (Wacek Kusnierczyk)
Date: Mon, 01 Jun 2009 16:30:01 +0200
Subject: [Rd] as.numeric(levels(factor(x))) may be a decreasing sequence
In-Reply-To: <18979.55347.718851.606502@cmath-5.math.ethz.ch>
References: <20090523074454.GA17112@cs.cas.cz>	<18973.42970.826686.173830@cmath-5.math.ethz.ch>	<4A1DC057.80401@idi.ntnu.no>	<18975.59582.885300.549159@lynne.math.ethz.ch>	<4A203D67.8000007@idi.ntnu.no>	<3f1d2410905291448y271fa484te82b8dbaa547017f@mail.gmail.com>	<4A20F97B.1090406@idi.ntnu.no>	<18977.28100.532043.734122@cmath-4.math.ethz.ch>	<20090531082941.GA12517@cs.cas.cz>
	<18979.55347.718851.606502@cmath-5.math.ethz.ch>
Message-ID: <4A23E5E9.5090209@idi.ntnu.no>

Martin Maechler wrote:
>>>>>> "PS" == Petr Savicky <savicky at cs.cas.cz>
>>>>>>     on Sun, 31 May 2009 10:29:41 +0200 writes:
>>>>>>             
>
> [............]
>
>     PS> I appreciate the current version, which contains static
>     PS> const char* dropTrailing0(char *s, char cdec) ...
>     PS> mkChar(dropTrailing0((char *)EncodeReal(x, w, d, e,
>     PS> OutDec), ...
>
>     PS> Here, is better visible that the cast (char *) is used
>     PS> than if it was hidden inside dropTrailing0(). Also, it
>     PS> makes dropTrailing0() more consistent.
>
>     PS> I would like to recall the already discussed
>     PS> modification if (replace != p) while((*(replace++) =
>     PS> *(p++))) ; which saves a few instructions in the more
>     PS> frequent case that there are no trailing zeros.
>
> Yes,  thank you.  This already was in my working version,
> and I had managed to lose it again.
> Will put i back
>
> .... still hoping this topic would be closed now ...
>   

i would rather hope for the EncodeReal flaw to be repaired...


vQ



[Rd] as.numeric(levels(factor(x))) may be a decreasing sequence
Wacek Kusnierczyk