(PR#1608) merge.data.frame can coerce character vectors to factor in some circumstances (PR#1608)
David Brahm
brahm@alum.mit.edu
Wed, 29 May 2002 09:58:55 -0400
Brian D. Ripley <ripley@stats.ox.ac.uk> wrote:
> As I said before, [characters converted to factors] is a consequence of the
> general rules. Data frames are not designed to have character columns, and
> those who insist on using them must make themselves aware of the
> consequences.
I think this is as true in S-Plus as it is in R, because S is fundamentally a
language designed for statistics, where everything is a real number or a
conditioning variable. As a result, I (and my former group) abandoned the use
of dataframes years ago. We created our own pseudo-class of "dataobjects"
(lists of equal-length vectors), and built our own versions of many standard
functions (read.table -> g.dataobj, merge -> g.join, "[" -> g.subset, etc.) for
them.
Dave Kane has made a strong push to use existing R classes and built-in
functions, but I'm convinced now I can bring him over to the Dark Side.
--
-- David Brahm (brahm@alum.mit.edu)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._