How about union() ?

> a <- as.character(c("a", "b", "c", "d", "e"))
> b <- as.character(c("d", "a", "c", "e", "f", "b"))
>
> union(a,b)
[1] "a" "b" "c" "d" "e" "f"

HTH,
Jorge

On Sun, Jan 31, 2010 at 10:31 PM, stephen sefick <> wrote:

> 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
>
> ______________________________________________
> 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.
>

	[[alternative HTML version deleted]]

