Remove duplicated elements from list
问题 I have a list of character vector s: my.list <- list(e1 = c("a","b","c","k"),e2 = c("b","d","e"),e3 = c("t","d","g","a","f")) And I'm looking for a function that for any character that appears more than once across the list 's vector s (in each vector a character can only appear once), will only keep the first appearance. The result list for this example would therefore be: res.list <- list(e1 = c("a","b","c","k"),e2 = c("d","e"),e3 = c("t","g","f")) Note that it is possible that an entire