compactList {annotationTools} | R Documentation |
Concatenates given elements of a list.
compactList(lst,l)
lst |
list object |
l |
numeric vector specifying the number of list elements to be concatenated sequentially |
By definition, the output list is shorter than the input list.
Function stops if 'sum(l)' does not equal 'lenght(lst)'.
clst |
list of length 'length(l)' where the 'i'-th element has length 'l[i]' and contains concatenated elements of input list 'lst'. |
Alexandre Kuhn, alexandre.kuhn@isb-sib.ch
##an example list lst<-vector('list',3) lst[[1]]<-c('aaa','bbb') lst[[2]]<-'ccc' lst[[3]]<-'zzz' ##merge first 2 list elements compactList(lst,c(2,1))