Skip to content

Commit

Permalink
Merge pull request #2 from meantrix/stopcluster
Browse files Browse the repository at this point in the history
fix stop cluster
  • Loading branch information
igor-siciliani authored Mar 17, 2020
2 parents ba3b08c + ab42437 commit a2a76dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
^.*\.Rproj$
^\.Rproj\.user$
11 changes: 4 additions & 7 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
exportPattern("^[[:alpha:]]+")
import(stats)
import(lsr)
import(foreach)
import(parallel)
import(doParallel)
import(caret)
# Generated by roxygen2: do not edit by hand

export(corrP)
export(rh_corrP)
4 changes: 3 additions & 1 deletion R/corrP.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ cor_fun <- Vectorize(cor_fun, vectorize.args=c("pos_1", "pos_2"))

doParallel::registerDoParallel(min(parallel::detectCores(),n.cores))
corrmat<-cor_par(df,p.value=p.value)
#force stop
env <- foreach:::.foreachGlobals
rm(list=ls(name=env), pos=env)
doParallel::stopImplicitCluster()

} else {
} else {
# sequential corr matrix
corrmat <- outer(1:NCOL(df)
, 1:NCOL(df)
Expand Down

0 comments on commit a2a76dd

Please sign in to comment.