Message-ID: <1d2.1901b925.2d5407c7@aol.com>
Date: 2004-02-05T20:55:35Z
From: DJNordlund@aol.com
Subject: correction to the previously asked question (about merging factors)
>In a message dated 2/5/2004 12:25:01 PM Pacific Standard Time,
>svetlana.eden at vanderbilt.edu writes:
>I have two factors l1, l2, and I'd like to merge them.
>
>(Remark: The factors can not be converted to charaters)
>
>Function c() does not give me the result I want:
>
>
>> l1 = factor(c('aaaa', 'bbbb'))
>> l2 = factor(c('ccc', 'dd'))
>> lMerge = factor(c(l1, l2))
>> lMerge
>[1] 1 2 1 2
>Levels: 1 2
>
>I'd like to merge l1 and l2 and to get lMerge
>----------------------------------------------
>
>[1] aaaa bbbb ccc dd
>Levels: aaaa bbbb ccc dd
How about something like:
IMerge<- factor(c(as.character(I1),as.character(I2)))
Dan Nodlund