[R] object not found with %dopar% when using foreach

From: Nicolas Berkowitsch <nicolas.berkowitsch_at_unibas.ch>
Date: Fri, 27 May 2011 17:29:38 +0200


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/

______________________________________________
R-help_at_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.
Received on Fri 27 May 2011 - 15:31:59 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 27 May 2011 - 16:00:10 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive