Skip to content

Commit

Permalink
Replace .onLoad with setLoadActions
Browse files Browse the repository at this point in the history
  • Loading branch information
DarwinAwardWinner committed May 28, 2013
1 parent 59b35c7 commit c9a5c03
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/zzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
}
}

.onLoad <-
function(libname, pkgname)
{
setLoadActions(registerDefaultParams=function(env) {
## only SnowParam on widows, which is then the default (first)
register(getOption("SnowParam", SnowParam(workers=detectCores())))
if (.Platform$OS.type != "windows")
register(getOption("MulticoreParam", MulticoreParam()))
}
})

0 comments on commit c9a5c03

Please sign in to comment.