Hi I try parallelising some code using the snow package and the following lines:
cl <- makeSOCKcluster(8) pfunc <- function (x) (if(x <= (-th)) 1 else 0) ###correlation coefficient clusterExport(cl,c("pfunc","th")) cor.c.f <- parApply(cl,tms,c(1,2),FUN=pfunc) The parApply results in the error message: > cor.c.f <- parApply(cl,tms,c(1,2),FUN=pfunc) Error in do.call("fun", lapply(args, enquote)) : could not find function "fun". Any ideas? Best wishes Kristian ________________________________ Helmholtz Zentrum M?nchen Deutsches Forschungszentrum f?r Gesundheit und Umwelt (GmbH) Ingolst?dter Landstr. 1 85764 Neuherberg www.helmholtz-muenchen.de Aufsichtsratsvorsitzende: MinDir?in B?rbel Brumme-Bothe Gesch?ftsf?hrer: Prof. Dr. G?nther Wess und Dr. Nikolaus Blum Registergericht: Amtsgericht M?nchen HRB 6466 USt-IdNr: DE 129521671 [[alternative HTML version deleted]] ______________________________________________ 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.