R/parallel.r

Defines functions start.para stop.para

start.para <-
function(ncore, varlist, type=NULL) {
  if(ncore>1) {
      if(is.null(type)) cl <- makeCluster(ncore)
      else cl <- makeCluster(ncore,type=type)
  }
  else cl <- NULL
 clusterExport(cl, 
		c(varlist), 
		envir=parent.frame())
  .dump <- clusterEvalQ(cl, eval(require(DESnowball)))
  cl
}

stop.para <-
function(cl) {
  stopCluster(cl)
}
#
#snowball.initexpr <- function(){
#  expression({
#      require(DESnowball)
#  })
#}

Try the DESnowball package in your browser

Any scripts or data that you put into this service are public.

DESnowball documentation built on May 1, 2019, 6:34 p.m.