If I were you, I would use the snowfall package. It's made to easy extend
parallel computing using apply family functions.

Your code would go along the lines of

sfInit(parallel = TRUE, cpus = 2, type = "SOCK")
sfLapply(x = my.object, fun = my.function)
sfStop()




Cheers,
Roman


On Thu, Jul 21, 2011 at 7:27 PM, Megh Dal <megh700004@yahoo.com> wrote:

> Dear all, I was exploring the "dopar" mechanism in foreach package, however
> it seems that "dopar" can be applied only in place of 'for' loop. Here my
> question is: can it be used with 'lapply' construct?
>
> I have a big 'list' object and I am in some process to apply some complex
> custom made function on each element of that 'list' object. I have dual core
> windows vista system, and planning to break that list into 2 part of equal
> length, then apply that function simultaneously using both cores.
>
> Can somebody throw some light how to achieve that?
>
> Thanks for your help,
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>



-- 
In God we trust, all others bring data.

	[[alternative HTML version deleted]]

