From 514a7e0f671047a6405f67e6852b8a38db0919b3 Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Wed, 6 Sep 2023 11:15:01 +0100 Subject: [PATCH] fixed wording in extract_convert vignette and reduced db printing in epiparameter vignette --- vignettes/epiparameter.Rmd | 10 +++++----- vignettes/extract_convert.Rmd | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vignettes/epiparameter.Rmd b/vignettes/epiparameter.Rmd index 6e91e1267..c54b9d02e 100644 --- a/vignettes/epiparameter.Rmd +++ b/vignettes/epiparameter.Rmd @@ -62,8 +62,8 @@ The `` class has a custom printing method which gives a summary of the The `` class is based (i.e. inherits from) the data frame, and therefore the same subsetting and manipulation can be carried out, including the `head()` and `tail()` of the database. ```{r, subsetting-head-tail-epiparam} -head(epi_dist_db)[, 1:5] -tail(epi_dist_db)[, 1:5] +head(epi_dist_db)[, 1:4] +tail(epi_dist_db)[, 1:4] ``` The epidemiological library contains multiple columns, each storing different features of the parameter: @@ -98,10 +98,10 @@ An `` object can be converted from one of the rows of the `` ```{r convert-epiparam-epidist} # find entry for COVID-19 -epi_dist_covid <- epi_dist_db[which(epi_dist_db$disease == "COVID-19"), ] +epi_dist_covid <- epi_dist_db[epi_dist_db$disease == "COVID-19", ] # find entry for COVID-19 incubation period -epi_dist_covid_incub <- epi_dist_covid[which(epi_dist_covid$epi_distribution == "incubation_period"), ] # nolint +epi_dist_covid_incub <- epi_dist_covid[epi_dist_covid$epi_distribution == "incubation_period", ] # nolint # select one of the COVID-19 incubation period covid_incub <- epi_dist_covid_incub[10, ] @@ -111,7 +111,7 @@ covid_incub <- as_epidist(covid_incub) covid_incub ``` -The `` object also has a custom printing method which shows the disease, pathogen (if known), the epidemiological distribution, a short citation of the study the parameters are from and the probability distribution and parameter of that distribution (if available). +The `` object also has a custom printing method which shows the disease, pathogen (if known), the epidemiological distribution, a citation of the study the parameters are from and the probability distribution and parameter of that distribution (if available). The opposite conversion from `` to `` can also be achieved using `as_epiparam()`. diff --git a/vignettes/extract_convert.Rmd b/vignettes/extract_convert.Rmd index d72a05cb9..6936db31d 100644 --- a/vignettes/extract_convert.Rmd +++ b/vignettes/extract_convert.Rmd @@ -55,7 +55,7 @@ There are two conversion functions in {epiparameter}: `convert_params_to_summary ### Conversion functions -The conversion functions have two arguments. The first (`distribution`) defines which distribution you want to use and the second (`...`) lets you put as many named parameters or summary statistics as required. The arguments passed into `...` are matched name, and therefore need to match exactly to the names expected. See the function documentation (`?convert_params_to_summary_stats` and `?convert_summary_stats_to_params` for names). +The conversion functions have two arguments. The first (`distribution`) defines which distribution you want to use and the second (`...`) lets you put as many named parameters or summary statistics as required. The arguments passed into `...` are matched by name, and therefore need to match exactly to the names expected. See the function documentation (`?convert_params_to_summary_stats` and `?convert_summary_stats_to_params` for names). All currently supported summary statistic conversions in {epiparameter} are given below for each distribution.