Hi!

Context
-------

R Version: 0.62.2  (July 10, 1998)
Platform: Red Hat Linux 5.1


Problem
-------

In previous releases of R, the following code

    x <- as.factor(c('A','B','C')
    rep(x, 3)

would return

    [1] A B C A B C A B C

(a factor).  However, after upgrading from 0.5x to 0.62.2, this same
code returns

    [1] 1 2 3 1 2 3 1 2 3

Thus, rep() is doing what I would call "losing type" -- that is, I
give it a factor, but it returns to me a numeric vector.


Question
--------

Is this a bug or a feature?  In previous versions of R, rep() "kept
type", as it does with S-Plus (Windows Version 4.0R3).  If this 
behavior is in fact not a bug but a feature, then I'd appreciate any
help on understanding how I should go about replicating factors.


Thanks!
Doug


------------------------------------------------------------------------------
Doug Morse                      please visit URL       Voice:   615 / 340-3400
Learning Technology Ctr   http://www.pobox.com/~morse    Fax:   615 / 340-3410
Vanderbilt University         for more information    E-Mail:  morse@pobox.com
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

