R/compactList.R

Defines functions compactList

Documented in compactList

compactList<-function(lst,l) {

	stopifnot(length(lst)==sum(l))
	clst<-vector('list',length(l))
	j<-1
	for (i in 1:length(l)) {
		clst[[i]]<-unlist(lst[j:(j+l[i]-1)])
		j<-j+l[i]
	}
	clst
}

Try the annotationTools package in your browser

Any scripts or data that you put into this service are public.

annotationTools documentation built on Nov. 8, 2020, 6:58 p.m.