[R] Merge list element by name

Mohammad Tanvir Ahamed mashranga at yahoo.com
Thu Apr 13 16:56:37 CEST 2017


Hi, 
I have a list like 
kk<- list (a = 1:5, b = 6:10, c = 4:11)

Now i want to merger (Union) the list element "a" and "c" by name .

My expected outcome is 
kk1<- list(a_c = 1:11, b = 6:10)


I can do it with several lines of code. But can any one have idea to do efficiently/ quickly on a big data with less code.
Thanks in advance. 
 
Tanvir Ahamed 
Göteborg, Sweden  |  mashranga at yahoo.com 



More information about the R-help mailing list