问题
I have a function foo written in Rcpp which I can utilize in my R session through sourceCpp.
I also have a cluster of machines using R's parallel makePSOCKCluster. I want to run a parallel foreach loop across these machines which will utilize foo. I can see the function being exported through foreach, but I think only the pointer to the Rcpp function is exported. How can I make sure that the function foo itself is also exported?
来源:https://stackoverflow.com/questions/26418655/rcpp-sourcecpp-with-parallel-foreach