Skip to content
Snippets Groups Projects
Commit bcea35ca authored by Francesco Sabatini's avatar Francesco Sabatini
Browse files

updated 01b

parent a7a54e7e
No related branches found
No related tags found
No related merge requests found
......@@ -142,17 +142,17 @@ Mesobromion <- function(species.path, traits.path, output, myfunction="get.corXY
}
## Divide in chunks if requested
if(chunkn>1){
print(paste("nround", nround, "--- divide in", chunkn, "chunks"))
indices <- 1:length(allcomb.t)
chunks <- split(indices, sort(indices%%chunkn))
} else {chunks <- list(1:length(allcomb.t))}
#names.t <- unlist(lapply(allcomb.t, paste, collapse="_"))
# if(chunkn>1){
# print(paste("nround", nround, "--- divide in", chunkn, "chunks"))
# indices <- 1:length(allcomb.t)
# chunks <- split(indices, sort(indices%%chunkn))
# } else {chunks <- list(1:length(allcomb.t))}
# #names.t <- unlist(lapply(allcomb.t, paste, collapse="_"))
## start main foreach loop
print(paste("Start main loop - round", nround))
corXY.output <- foreach(ch=chunks, .combine=rbind) %myinfix% {
allcomb.i <- allcomb.t[unlist(ch)]
corXY.output <- foreach(ch=1:length(allcomb.t, .combine=rbind) %myinfix% {
allcomb.i <- allcomb.t[ch]
print(paste("Running on", length(allcomb.i),"out of", nall, "combinations"))
for(i in 1:length(allcomb.i)){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment