Nicolas Berkowitsch
2011-May-27 15:29 UTC
[R] object not found with %dopar% when using foreach
Dear R-List member, tried implement the foreach loop. It works fine, when I'm using %do%, but not when I'm using %dopar%. I always receive one of the following error messages: error in { : task 1 failed - "Objekt 'S3' not found" - could the .export be an solution for this?? Any help is much appreciated! The Code hast the following structure: ########## dft3 = function (...) { ... } optDFT = function (...) ... for (sit in 1:n.sit){ S3 = ... pDFT3 = ... dft3(..) } return(LL.DFT) } foreach(k=1:n.run) %dopar% { for (j in 1:n.subj) { ... valuesDFT = nlminb(start=..., objective = optDFT) } } -- ____________ lic. phil. Nicolas A. J. Berkowitsch Universit?t Basel Fakult?t f?r Psychologie Economic Psychology Missionsstrasse 62a CH-4055 Basel Tel. +41 61 267 05 75 E-Mail nicolas.berkowitsch at unibas.ch Web http://psycho.unibas.ch/abteilungen/abteilung-details/home/abteilung/economic-psychology/
Maybe Matching Threads
- saving multiple arrays from a foreach loop
- overleap an iteration within a for-loop when error message produced
- pmnorm: probabilites don't sum up to 1
- . Package gamlss used inside foreach() and %dopar% fails to find an object (Nik Tuzov)
- Package gamlss used inside foreach() and %dopar% fails to find an object