Skip to content

Instantly share code, notes, and snippets.

@tajmorton
tajmorton / bigcorPar.r
Last active January 3, 2016 04:59 — forked from bobthecat/bigcorPar.r
Fix a type and change `MAT` to `x` to refer to input matrix.
bigcorPar <- function(x, nblocks = 10, verbose = TRUE, ncore="all", ...){
library(ff, quietly = TRUE)
require(doMC)
if(ncore=="all"){
ncore = multicore:::detectCores()
registerDoMC(cores = ncore)
} else{
registerDoMC(cores = ncore)
}