Skip to content

Commit 3f86ddd

Browse files
avallecamclaude
andcommitted
clarify country selection prose and update callout title in contact-matrices
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 102c437 commit 3f86ddd

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

episodes/contact-matrices.Rmd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,17 @@ survey_load <- socialmixr::load_survey(files = survey_files)
8686
```
8787

8888
::::::::::::::::::::::::::::::::::::: callout
89-
### Specify the country name
89+
### Inspect available countries
9090

9191
A single survey file can contain data from multiple countries. You can inspect the available countries with:
9292

9393
```{r polymod_countries, echo = TRUE}
9494
levels(survey_load$participants$country)
9595
```
9696

97-
Always pass the `countries =` argument to `contact_matrix()` to make sure you use data from the intended country only.
98-
9997
::::::::::::::::::::::::::::::::::::::::::::::::
10098

101-
Then we can obtain the contact matrix for the age categories we want by specifying `age_limits`. We also add `return_demography = TRUE` to include demographic information in the output, which is required when using the contact matrix with `{epidemics}`.
99+
We obtain the contact matrix for the United Kingdom — passing `countries = "United Kingdom"` to select data from the intended country, `age_limits` to define age categories, and `return_demography = TRUE` to include demographic information required by `{epidemics}`.
102100

103101
```{r polymod_uk, echo = TRUE}
104102
contacts_byage <- socialmixr::contact_matrix(

0 commit comments

Comments
 (0)