Skip to content

Commit a2a76dd

Browse files
Merge pull request #2 from meantrix/stopcluster
fix stop cluster
2 parents ba3b08c + ab42437 commit a2a76dd

3 files changed

Lines changed: 9 additions & 8 deletions

File tree

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
^.*\.Rproj$
2+
^\.Rproj\.user$

NAMESPACE

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
exportPattern("^[[:alpha:]]+")
2-
import(stats)
3-
import(lsr)
4-
import(foreach)
5-
import(parallel)
6-
import(doParallel)
7-
import(caret)
1+
# Generated by roxygen2: do not edit by hand
2+
3+
export(corrP)
4+
export(rh_corrP)

R/corrP.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,12 @@ cor_fun <- Vectorize(cor_fun, vectorize.args=c("pos_1", "pos_2"))
196196

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

202-
} else {
204+
} else {
203205
# sequential corr matrix
204206
corrmat <- outer(1:NCOL(df)
205207
, 1:NCOL(df)

0 commit comments

Comments
 (0)