I am a newbie to R. I have a list t1
in R which looks like
[[1]]
[[1]][[1]]
[1] "a" "control"
[[2]]
[[2]][[1]]
[1] "a" "disease1"
[[3]]
[[3]][[1]]
[1] "a" "disease2"
[[4]]
[[4]][[1]]
[1] "b" "control"
[[5]]
[[5]][[1]]
[1] "b" "disease1"
[[6]]
[[6]][[1]]
[1] "b" "disease2"
I need to get a unique list of first elements into a vector i.e ["a", "b"] from this vector t1
. How can I do this?
dput
. – Connect