Skip to content

Commit 3bf8711

Browse files
committed
fix lint
1 parent 5a21fb6 commit 3bf8711

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

episodes/superspreading-simulate.Rmd

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,26 +299,19 @@ Now we are prepared to use the `simulate_chains()` function from `{epichains}` t
299299

300300
```{r,message=FALSE,warning=FALSE,eval=FALSE}
301301
epichains::simulate_chains(
302-
303-
# simulation controls
304302
n_chains = 1,
305303
statistic = "size",
306-
307-
# offspring
308304
offspring_dist = rnbinom,
309305
mu = mers_offspring["mean"],
310306
size = mers_offspring["dispersion"],
311-
312-
# generation
313307
generation_time = function(x) generate(x = serial_interval, times = x)
314-
315308
)
316309
```
317310

318311
`simulate_chains()` requires three sets of arguments as a minimum:
319312

320-
- simulation controls (`n_chains` and `statistic`),
321-
- offspring distribution (`offspring_dist` and required distribution parameters), and
313+
- **simulation controls** (`n_chains` and `statistic`),
314+
- **offspring distribution** (`offspring_dist` and required distribution parameters), and
322315
- generation time (`generation_time`).
323316

324317
In the lines above, we described how to specify the offspring distribution and generation time. The **simulation controls** include at least two arguments:
@@ -406,7 +399,7 @@ The argument `t0` defines the start time of each initial case per chain.
406399
One example of using iteration is available in the `{epichains}` vignette on [Projecting infectious disease incidence: a COVID-19 example](https://epiverse-trace.github.io/epichains/articles/projecting_incidence.html). The aim is to simulate the importation of 13 cases during different moments in time.
407400

408401
```{r}
409-
epichains::covid19_sa[1:5, ] %>%
402+
epichains::covid19_sa[1:5, ] %>%
410403
dplyr::mutate(start_time = date - min(date))
411404
```
412405

0 commit comments

Comments
 (0)