-----Original Message-----
From: r-help-bounces at stat.math.ethz.ch
[mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Svetlana Eden
Sent: Thursday, February 05, 2004 2:51 PM
To: r-help at stat.math.ethz.ch
Subject: Re: [R] What is the correct way to merge factors?
I have two factors l1, l2, and I'd like to merge them.
Function c() does not give me the result I want:
l1 = factor(c('a', 'b'))
l2 = factor(c('c', 'd'))
lMerge = c(l1, l2)
lMerge
I'd like to merge l1 and l2 and to get lMerge
----------------------------------------------
[1] a b c d
Levels: a b c d
instead of
----------
[1] 1 2 1 2
How should I do that?
---------------------
--
Svetlana Eden Biostatistician II School of Medicine
Department of Biostatistics Vanderbilt
University