Skip to content

Commit

Permalink
update function
Browse files Browse the repository at this point in the history
  • Loading branch information
frahik committed Dec 10, 2018
1 parent b326323 commit 708f4c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/detectCore.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
NULL

validate.parallelCores <- function(parallelCores){
nCore <- detectCores() * .5
nCore <- detectCores()
if (nCore < parallelCores) {message(paste0('[!] For safe analysis, we stablish only ', floor(nCore * .5), ' core(s) to do the analysis.'))}
ifelse(nCore < parallelCores, return(floor(nCore * .5)), return(parallelCores))
}

0 comments on commit 708f4c6

Please sign in to comment.