On Feb 12, 2010, at 5:06 PM, Zoppoli, Gabriele (NIH/NCI) [G] wrote:

Sorry, maybe it's easy but I haven't found anything useful:

how can I obtain a list C that contains all the members in the list B that are not in list A? This are lists of nanes, not numbers!

> A <- list("a", "b" , "c")
> B <- list("a", "b" , "c", "d")
> C <- setdiff(A,B)
> C
list()
> C <- setdiff(B, A)
> C
[[1]]
[1] "d"

--

David Winsemius, MD
Heritage Laboratories
West Hartford, CT

______________________________________________
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