Skip to content

Commit

Permalink
add examples to sim_* documentation of using argument defaults, WIP #120
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwlambert committed Jul 17, 2024
1 parent 8828d8e commit 49fec59
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 19 deletions.
7 changes: 6 additions & 1 deletion R/sim_contacts.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@
#' @author Joshua W. Lambert, Carmen Tamayo
#'
#' @examples
#' # load data required to simulate contacts
#' # quickly simulate contact tracing data using the function defaults
#' contacts <- sim_contacts()
#' head(contacts)
#'
#' # to simulate more realistic contact tracing data load epiparameters from
#' # {epiparameter}
#' contact_distribution <- epiparameter::epidist(
#' disease = "COVID-19",
#' epi_dist = "contact distribution",
Expand Down
7 changes: 6 additions & 1 deletion R/sim_linelist.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@
#' @author Joshua W. Lambert, Carmen Tamayo
#'
#' @examples
#' # load data required to simulate line list
#' # quickly simulate a line list using the function defaults
#' linelist <- sim_linelist()
#' head(linelist)
#'
#' # to simulate a more realistic line list load epiparameters from
#' # {epiparameter}
#' contact_distribution <- epiparameter::epidist(
#' disease = "COVID-19",
#' epi_dist = "contact distribution",
Expand Down
8 changes: 7 additions & 1 deletion R/sim_outbreak.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
#' @author Joshua W. Lambert
#'
#' @examples
#' # load data required to simulate outbreak data
#' # quickly simulate an outbreak using the function defaults
#' outbreak <- sim_outbreak()
#' head(outbreak$linelist)
#' head(outbreak$contacts)
#'
#' # to simulate a more realistic outbreak load epiparameters from
#' # {epiparameter}
#' contact_distribution <- epiparameter::epidist(
#' disease = "COVID-19",
#' epi_dist = "contact distribution",
Expand Down
13 changes: 9 additions & 4 deletions man/sim_contacts.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions man/sim_linelist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions man/sim_outbreak.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 49fec59

Please sign in to comment.