lbraglia / RStata

[R package]: A R-Stata interface
112 stars 37 forks source link

Add R process ID to temp filenames #15

Open icostatistics opened 4 years ago

icostatistics commented 4 years ago

When using the excellent RStata package, I came across an issue when I tried to run several rather work intensive Stata "margins" calls in parallel using the RStata- and drake-packages. Since the temporary RStata.do, RStataDataIn.dta and RStataDataOut.dta files have the same name for all the parallel processes, I encountered some unsolvable conflicts. Simply adding the R process ID to the temporary file names solved the problem.