I have a multi-nested for-loop that I need to restart the entire loop once the last nest (here, clip.groups) is complete. I have tried several options. Each layer involves rasters and I cannot vectorize it through apply, etc. Since there are so many input files, it is not reproducible.
The basic structure though is this:
clip.groups <- c('Bay area','Alameda County','Oakland','West and Downtown Oakland')
rate.groups <- c('co.25','cbg.25')
conc.groups <- c('ppb', 'ug')
pop.groups <- c('pop.ls.night.25')
beta.groups <- c(0.001105454,0.000318195,0.001881231)
for (j in 1:length(conc.groups)){
for (i in 1:length(beta.groups)){
for (k in 1:length(rate.groups)){
for (h in 1:length(pop.groups)){
for (m in 1:length(clip.groups)){
break #==== THIS IS WHERE I NEED IT TO GO BACK TO THE OUTER MOST LOOP - (conc.groups j)
}
}
}
}
}
}
}