Unverified Commit 2f37151c authored by cziegenhain's avatar cziegenhain Committed by GitHub
Browse files

Merge pull request #181 from JesperGrud/master

Speed up when the dataset can be in a single chunk
parents 7c8b1038 2c30a1d2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -18,7 +18,8 @@ splitRG<-function(bccount,mem){
  nc<-nrow(bccount)
  cs=0
  chunkID=1
  bccount[,chunkID:=0]
  bccount[,chunkID:=1]
  if(sum(bccount$n) > maxR) {
  for(i in 1:nc){
    cs=cs+bccount[i]$n
    if(bccount[i]$n>maxR){
@@ -33,6 +34,7 @@ splitRG<-function(bccount,mem){
    }
    bccount[i][,"chunkID"]=chunkID
  }
    }
  return(bccount)
}