Package: socialmixr 0.6.0

Sebastian Funk

socialmixr: Social Mixing Matrices for Infectious Disease Modelling

Methods for sampling contact matrices from diary data for use in infectious disease modelling, as discussed in Mossong et al. (2008) <doi:10.1371/journal.pmed.0050074>.

Authors:Sebastian Funk [aut, cre], Lander Willem [aut], Hugo Gruson [aut], Nicholas Tierney [aut], Maria Bekker-Nielsen Dunbar [ctb], Carl A. B. Pearson [ctb], Sam Clifford [ctb], Christopher Jarvis [ctb], Alexis Robert [ctb], Niel Hens [ctb], Pietro Coletti [col, dtm], Lloyd Chapman [ctb]

socialmixr_0.6.0.tar.gz
socialmixr_0.6.0.zip(r-4.7)socialmixr_0.6.0.zip(r-4.6)socialmixr_0.6.0.zip(r-4.5)
socialmixr_0.6.0.tgz(r-4.6-any)socialmixr_0.6.0.tgz(r-4.5-any)
socialmixr_0.6.0.tar.gz(r-4.7-any)socialmixr_0.6.0.tar.gz(r-4.6-any)
socialmixr_0.6.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
socialmixr/json (API)
NEWS

# Install 'socialmixr' in R:
install.packages('socialmixr', repos = c('https://epiforecasts.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/epiforecasts/socialmixr/issues

Pkgdown/docs site:https://epiforecasts.io

Datasets:
  • polymod - Social contact data from 8 European countries

On CRAN:

Conda:

10.76 score 43 stars 2 packages 288 scripts 1.0k downloads 6 mentions 26 exports 37 dependencies

Last updated from:bbf7741f1a (on v0.6.0). Checks:1 ERROR, 8 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64ERROR177
source / vignettesOK201
linux-release-x86_64OK180
macos-release-arm64OK143
macos-oldrel-arm64OK114
windows-develOK133
windows-releaseOK121
windows-oldrelOK126
wasm-releaseOK121

Exports:agegroups_to_limitsas_contact_surveyassign_age_groupscheckcleancompute_matrixcontact_age_distributioncontact_matrixdownload_surveyget_citationget_surveylimits_to_agegroupslist_surveysload_surveymatrix_plotper_capitapop_agereduce_agegroupssplit_matrixsurveysurvey_countriessurvey_country_populationsymmetriseweighwpp_agewpp_countries

Dependencies:askpassbackportscachemcheckmateclicountrycodecpp11curldata.tablefastmapgenericsgluehttrjsonlitelifecyclelubridatemagrittrmemoisemimeoaiopensslpillarpkgconfigplyrpurrrR6Rcpprlangstringistringrsystibbletimechangeutf8vctrswpp2017xml2

Introduction to socialmixr

Rendered fromsocialmixr.Rmdusingknitr::rmarkdownon Jun 02 2026.

Last update: 2026-04-23
Started: 2022-06-16

Readme and manuals

Help Manual

Help pageTopics
Subset a contact survey[.contact_survey
Convert age groups to lower age limitsagegroups_to_limits
Check contact survey dataas_contact_survey
Assign age groups in survey dataassign_age_groups
Check contact survey datacheck check.contact_survey
Clean contact survey dataclean clean.contact_survey
Compute contact matrix from prepared survey datacompute_matrix
Extract the empirical age distribution of contacts from a surveycontact_age_distribution
Generate a contact matrix from diary survey datacontact_matrix
Download a survey from its Zenodo repositorydownload_survey
Citation for a surveyget_citation
Get a survey, either from its Zenodo repository, a set of files, or a survey variableget_survey
Checks if a character string is a DOIis_doi
Convert lower age limits to age groups.limits_to_agegroups
List all surveys available for downloadlist_surveys
Load a survey from local filesload_survey
Draws an image plot of a contact matrix with a legend strip and the numeric values in the cells.matrix_plot
Convert a contact matrix to per-capita ratesper_capita
Social contact data from 8 European countriespolymod
Change age groups in population datapop_age
Reduce the number of age groups given a broader set of limitsreduce_agegroups
Decompose a contact matrix into mean contacts, normalisation and assortativitysplit_matrix
Contact surveysurvey
List all countries contained in a surveysurvey_countries
Get survey country population datasurvey_country_population
Symmetrise a contact matrixsymmetrise
Weigh survey participantsweigh
Get age-specific population data according to the World Population Prospects 2017 editionwpp_age
List all countries and regions for which socialmixr has population datawpp_countries