Skip to content
Snippets Groups Projects
Commit 375ab45e authored by Todor Kondic's avatar Todor Kondic
Browse files

Reorder instructions

* R/run.R(sw.do): Move call to makeCluster.
parent 914071c2
No related branches found
No related tags found
No related merge requests found
...@@ -41,9 +41,8 @@ sw.do<-function(fn_data,fn_cmpd_list,mode,rdir=".",combine=F,proc=F) { ...@@ -41,9 +41,8 @@ sw.do<-function(fn_data,fn_cmpd_list,mode,rdir=".",combine=F,proc=F) {
wdirs<-sapply(basename(fn_data),function(nm) file.path(rdir,stripext(nm))) wdirs<-sapply(basename(fn_data),function(nm) file.path(rdir,stripext(nm)))
sapply(wdirs,no_drama_mkdir) sapply(wdirs,no_drama_mkdir)
stgs<-sapply(basename(wdirs),function (nm) paste(nm,"yml",sep='.')) stgs<-sapply(basename(wdirs),function (nm) paste(nm,"yml",sep='.'))
cl<-parallel::makeCluster(proc)
if (proc) { if (proc) {
cl<-parallel::makeCluster(proc)
p.sw(fn_data,stgs,wdirs,fn_cmpd_list,mode,combine=combine,cl=cl) p.sw(fn_data,stgs,wdirs,fn_cmpd_list,mode,combine=combine,cl=cl)
} else { } else {
v(fn_data,stgs,wdirs,fn_cmpd_list,mode,combine=combine) v(fn_data,stgs,wdirs,fn_cmpd_list,mode,combine=combine)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment