Brash Equilibrium
Brash Equilibrium

Reputation: 1357

How do I document parallel computations within knitr implemented in Rstudio?

I'm coding an agent-based simulation. I plan to run parallel instances of the simulation to reduce computing time. I will use the parallel package. I want to document my code using knitr. Before I start, I'd like to confirm whether there will be any issues running the parallel package's functions from within a Markdown or Sweave document that I compile with knitr.

Upvotes: 1

Views: 1193

Answers (1)

Thell
Thell

Reputation: 5958

It works...

Parallel Example in RStudio as run via knitr after being written in R markdown...

```{r parallel-do}
library(foreach)
library(parallel)
library(doParallel)
demo(sincParallel)
````

See output on Rpubs::

http://rpubs.com/Thell/6679

Upvotes: 4

Related Questions