v <- list(c("12", "1"), c("13", "1"), c("12", "3"))unique(sapply(v, "[[", 1))
Standard input is empty
[1] "12" "13"
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!