Displaying 1 result from an estimated 1 matches for "dlpo_sm_v".
2007 Feb 01
3
Can this loop be delooped?
...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.
I tried to see whether I could eliminate the loop, as follows. First I
defined a function:
intgpi <- function(totalength,numgroups,group...