[R] Catenating factors.
Marc Schwartz
marc_schwartz at comcast.net
Wed May 23 04:56:32 CEST 2007
On Wed, 2007-05-23 at 13:38 +1200, Rolf Turner wrote:
>
> I was recently asked by one of new colleagues how to combine, or catentate,
> or concatentate two factors. If x and y are factors, doing c(x,y) appears
> to coerce x and y to numeric mode before catenating them. So what does one
> do if one wants the result to be a factor whose levels are the union of the
> levels of x and y? I vaguely recall seeing this discussed in r-help, but I
> can't find anything on it there, nor in the FAQ.
>
> Am I missing something obvious?
Rolf,
I think that this thread from last November on R-devel may be helpful:
http://tolstoy.newcastle.edu.au/R/e2/devel/06/11/1130.html
HTH,
Marc Schwartz
More information about the R-help
mailing list