Date: Wed, 23 Jun 1999 08:04:32 -0700 (PDT)
From: "Z. Todd Taylor" <Todd.Taylor@pnl.gov>
Subject: Re: [R] coercing factors to matrix() --> num/char ? --
To: r-help@stat.math.ethz.ch
Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> wrote:
> Martin Maechler <maechler@stat.math.ethz.ch> writes:
[ snip... ]
> > >From this logic, coercing to a matrix should coerce to character rather
> > than integer/numeric codes.
>
> Hm. I'm not sure there really is much logic in this... Factors are
> sometimes character-like, sometimes integer-like.
I'd be interested to hear a discussion of when they need to
behave like integers. In my work I can't ever remember needing
anything other than the character representation in my "user
level" coding. I can see the need to access the integers for
"lower level" programming, for example, but when else?
(My thought has always been that factors should *always* coerce
to character unless the user explicitly requests otherwise.)
[ snip... ]
> Not really sure whether the problem is that R is consistent with
> itself or inconsistent with S. If we change as you suggest, we'll
> have two incompatibilities instead of one...
Factors are one area where I deem inconsistency with S a distinct
advantage. :-)
--Todd
-- Z. Todd Taylor Pacific Northwest National Laboratory Todd.Taylor@pnl.gov Why do you say there's one left, when it didn't leave? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._