[Rd] suggestion for extending ?as.factor

Petr Savicky savicky at cs.cas.cz
Tue May 12 13:17:15 CEST 2009


On Mon, May 11, 2009 at 05:06:38PM +0200, Martin Maechler wrote:
> The version I have committed a few hours ago is indeed a much
> re-simplified version, using  as.character(.) explicitly

The current development version (2009-05-11 r48528) contains
in ?factor a description of levels parametr

  levels: an optional vector of the values that 'x' might have taken. 
          The default is the unique set of values taken by
          'character(x)', sorted into increasing order _of 'x'_.  Note
          that this set can be smaller than 'sort(unique(x))'.

I think that 'character(x)' should be 'as.character(x)'.

Petr.



More information about the R-devel mailing list