Displaying 1 result from an estimated 1 matches for "numgp1_v".
2007 Feb 01
3
Can this loop be delooped?
...multiple
of the desired subvector size, then the first few subvectors have one more
element than the last few. I know that the cut function 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]
}...