Hi Jim,

Are you familiar with using the apply() functions (sapply, lapply) in R in
place of for loops?   If your code already uses these, you will find it very
easy to parallelize using the snowfall package and simply replacing them
with sfSapply and sfLapply.  Take a look at the package documentation if you
haven't already and see if that helps.

-Carl

On Wed, Dec 1, 2010 at 1:05 AM, Maas James Dr (MED) <J.Maas@uea.ac.uk>wrote:

> I would be most grateful if someone could point me in the right direction
> to get some instructions to parallelize some R code.  I have looked around
> and found a few examples, but still don't quite get it.  I am using a
> cluster running Sun Grid Engine and can use MPI as well.
>
> My job involves iterative data generation, and fitting of several Bayesian
> and Frequentist models in a format similar to:
>
>
> 1)      Create a set of data
>
> 2)      Sort/modify the overall data, creating subsets amenable to fitting
> by several different R packages
>
> 3)      Perform several different statistical analyses, each one using the
> appropriate data subset
>
> 4)      Collate the results from this iteration
>
> 5)      Goto step 1 multiple times
>
> 6)      Change a few parameters
>
> 7)      Goto step 1 multiple times
>
> 8)      Collate overall data outputs and quit.
>
> Any suggestions or small examples most welcome.
>
> Thanks
>
> Jim
>
>
> ===============================
> Dr. Jim Maas
> University of East Anglia
>
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-hpc mailing list
> R-sig-hpc@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-hpc
>



-- 
Carl Boettiger
UC Davis
http://www.carlboettiger.info/

	[[alternative HTML version deleted]]

