[R] String Comparison

stephen sefick ssefick at gmail.com
Mon Feb 1 04:31:06 CET 2010


a <- as.character(c("a", "b", "c", "d", "e"))
b <- as.character(c("d", "a", "c", "e", "f", "b"))

How would I get a list of only the unique values of these two
character vectors.  I would like the output a b c d e f there is no
reason to have these in order.  I am looking at to character vectors
of genes and I would like to know all of the unique genes from the two
vectors.  Thank you for all the help.
regards,

-- 
Stephen Sefick

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

								-K. Mullis



More information about the R-help mailing list