compactList {annotationTools}R Documentation

Concatenate list elements

Description

Concatenates given elements of a list.

Usage

compactList(lst,l)

Arguments

lst list object
l numeric vector specifying the number of list elements to be concatenated sequentially

Details

By definition, the output list is shorter than the input list.

Function stops if 'sum(l)' does not equal 'lenght(lst)'.

Value

clst list of length 'length(l)' where the 'i'-th element has length 'l[i]' and contains concatenated elements of input list 'lst'.

Author(s)

Alexandre Kuhn, alexandre.kuhn@isb-sib.ch

Examples

##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))

[Package annotationTools version 1.12.0 Index]