mood <- factor(c("blue", "sunny"))
skycolor <- factor(c("azure","blue","teal")

If factors are not defined with levels specifications, automatic merging should 
never be allowed. The fact that read.table automatically generates factors 
using default levels is why I nearly always import using as.is=TRUE, perform QC 
and combining of sources using strings, and only then convert to factor.

If you HAVE defined your factors using explicit levels definitions, you should 
have no trouble combining them.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnew...@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Sam Steingold <s...@gnu.org> wrote:

>> * Bert Gunter <thagre.ore...@trar.pbz> [2012-10-17 23:21:44 -0700]:
>>
>> However, Is level "5" in 'a' the same as level "5" in 'b' ?
>
>yes, of course.
>would anyone want to _different_ factors with identical string
>representations?!

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to