Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Fixed chunk size issue
Browse files Browse the repository at this point in the history
  • Loading branch information
brnleehng committed Feb 23, 2017
1 parent 54cbaeb commit d76fbdb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions R/doAzureParallel.R
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,14 @@ getparentenv <- function(pkgname) {

startIndices <- seq(1, length(argsList), chunkSize)

if(chunkSize > length(argsList)){
endIndices <- seq(length(argsList), length(argsList))
}
else{
endIndices <- seq(chunkSize, length(argsList), chunkSize)
}
endIndices <-
if(chunkSize >= length(argsList))
{
c(length(argsList))
}
else {
seq(chunkSize, length(argsList), chunkSize)
}

minLength <- min(length(startIndices), length(endIndices))

Expand Down

0 comments on commit d76fbdb

Please sign in to comment.