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.berkowit...@unibas.ch
Web      
http://psycho.unibas.ch/abteilungen/abteilung-details/home/abteilung/economic-psychology/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to