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

From: Wacek Kusnierczyk <Waclaw.Marcin.Kusnierczyk_at_idi.ntnu.no>
Date: Mon, 01 Jun 2009 16:30:01 +0200

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon 01 Jun 2009 - 14:46:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 01 Jun 2009 - 20:36:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive