search for: smallindexlist

Displaying 1 result from an estimated 1 matches for "smallindexlist".

2007 Feb 01
3
Can this loop be delooped?
...unction could be used to determine where to break up the vector, but it doesn't seem to provide control over where to put the larger and smaller subvectors. numgp1_v=sidect_v%/%compmin numgroup_v[small]=max(1,numgp1_v[small]) sidemin_v=sidect_v%/%numgroup_v nummax_v=sidect_v%%sidemin_v eix=0 smallindexlist<-list(NULL) for(i in 1:numgroup_v[small]) { bix=eix+1 eix=bix+sidemin_v[small]+(i<=nummax_v[small])-1 smallindexlist[[i]]<-dlpo_sm_v[bix:eix] } The key fact is that smallindexlist is a list, each list element is a subvector of dlpo_sm_v of the proper size. The sizes may be different....