Hi,

  Here is one for removing repeated strings.

> temp
$set1
[1] "a" "b" "d" "x"

$set2
[1] "b" "c" "q" "m"

$set3
[1] "b" "f" "e" "k" "q" "h"

> sapply(1:3,function(x){temp[[x]][as.numeric(table(unlist(temp))[temp[[x]]])==1]})
[[1]]
[1] "a" "d" "x"

[[2]]
[1] "c" "m"

[[3]]
[1] "f" "e" "k" "h"




--
View this message in context: 
http://r.789695.n4.nabble.com/remove-repeated-string-in-list-tp4704166p4704189.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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