diff --git a/.Rbuildignore b/.Rbuildignore index bfe7068..b5a39b8 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -13,3 +13,4 @@ ^docs$ ^pkgdown$ ^tools$ +^scratch\.R$ diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..25312d3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +README.md linguist-generated +man/** linguist-generated diff --git a/.github/workflows/dependency-change.yaml b/.github/workflows/dependency-change.yaml new file mode 100644 index 0000000..0c51cdf --- /dev/null +++ b/.github/workflows/dependency-change.yaml @@ -0,0 +1,83 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +# Adapted from Epiverse packages: https://github.com/epiverse-trace +on: + pull_request: + paths: + - 'DESCRIPTION' + +name: Analyze dependency changes + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + pull-requests: write + +jobs: + dependency-changes: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Setup R + uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - name: Install dependencies + uses: r-lib/actions/setup-r-dependencies@v2 + with: + packages: any::pak, glue, gh + + - name: Analyze dependency changes + shell: Rscript {0} + run: | + deps_base <- pak::pkg_deps("${{ github.repository }}@${{ github.base_ref }}", dependencies = TRUE) |> + subset(!directpkg) |> + subset(is.na(priority)) + # We install from PR number rather than branch to deal with the case + # of PR coming from forks + deps_head <- pak::pkg_deps("${{ github.repository }}#${{ github.event.number }}", dependencies = TRUE) |> + subset(!directpkg) |> + subset(is.na(priority)) + + deps_added <- deps_head |> + subset(!ref %in% deps_base$ref) + + deps_removed <- deps_base |> + subset(!ref %in% deps_head$ref) + + if (nrow(deps_added) + nrow(deps_removed) > 0) { + + message("Dependencies have changed! Analyzing...") + + if (nrow(deps_added) > 0) { + nudge <- "Reach out on slack (`#code-review` or `#help` channels) to double check if there are base R alternatives to the new dependencies.\n" + } else { + nudge <- "" + } + + msg <- glue::glue( + .sep = "\n", + "This pull request:", + "- Adds {nrow(deps_added)} new dependencies (direct and indirect)", + "- Adds {length(unique(deps_added$sysreqs))} new system dependencies", + "- Removes {nrow(deps_removed)} existing dependencies (direct and indirect)", + "- Removes {length(unique(deps_removed$sysreqs))} existing system dependencies", + "", + nudge, + "(Note that results may be inaccurate if you branched from an outdated version of the target branch.)" + ) + + message("Posting results as a pull request comment.") + + gh::gh( + "POST /repos/{repo}/issues/{issue_number}/comments", + repo = "${{ github.repository }}", + issue_number = "${{ github.event.number }}", + body = msg + ) + + } diff --git a/.github/workflows/render-readme.yaml b/.github/workflows/render-readme.yaml new file mode 100644 index 0000000..f305a40 --- /dev/null +++ b/.github/workflows/render-readme.yaml @@ -0,0 +1,97 @@ +# Adapted from Epiverse packages: https://github.com/epiverse-trace +# Reproduce locally by running: +# ```r +# pak::pak(c("any::rmarkdown", "any::usethis", ".")) +# writeLines( +# knitr::knit_expand( +# "README.Rmd", +# packagename = read.dcf("DESCRIPTION", "Package"), +# gh_repo = usethis:::github_remote_list()$repo_spec +# ), +# "README_expanded.Rmd" +# ) +# rmarkdown::render( +# "README_expanded.Rmd", +# output_file = "README.md", +# output_dir = "." +# ) +# unlink("README_expanded.Rmd") +# ``` +name: render-readme + +# Controls when the action will run. Triggers include: +# +# - button trigger from github action page +# - on changes to readme.Rmd + +on: + workflow_dispatch: + push: + branches: + # This may seem like a no-op but it prevents triggering on tags + # We use '**' rather '*' to accomodate names like 'dev/branch-1' + - '**' + paths: + - 'README.Rmd' + - '.github/workflows/render_readme.yml' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: write + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + render-readme: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Checkout repos + uses: actions/checkout@v4 + + - name: Setup R + uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - name: Setup pandoc + uses: r-lib/actions/setup-pandoc@v2 + + - name: Install dependencies + uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rmarkdown, local::. + + - name: Compile the readme + run: | + writeLines( + knitr::knit_expand( + "README.Rmd", + packagename = read.dcf("DESCRIPTION", "Package"), + gh_repo = Sys.getenv("GITHUB_REPOSITORY") + ), + "README_expanded.Rmd" + ) + rmarkdown::render( + "README_expanded.Rmd", + output_file = "README.md", + output_dir = "." + ) + shell: Rscript {0} + + - name: Commit files + run: | + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + git add README.md + # Also add README figures if they exist + if [ -d man/figures ] + then + git add man/figures/ + fi + git diff-index --quiet HEAD || git commit -m "Automatic readme update" + git pull --rebase origin ${{ github.ref.name }} + git push origin || echo "No changes to push" diff --git a/.github/workflows/update-copyright-year.yaml b/.github/workflows/update-copyright-year.yaml new file mode 100644 index 0000000..156291c --- /dev/null +++ b/.github/workflows/update-copyright-year.yaml @@ -0,0 +1,38 @@ +# Adapted from Epiverse packages: https://github.com/epiverse-trace +name: Update copyright year(s) in license file + +on: + workflow_dispatch: + schedule: + - cron: '0 3 1 1 *' + +permissions: + contents: write + pull-requests: write + +jobs: + run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: FantasticFiasco/action-update-license-year@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + path: | + LICENSE.md + prBody: > + This PR updates the copyright license for this new year! If you're reading this while you're celebrating, enjoy! Don't worry about this one :blush: + + ![Happy new year!](https://media.giphy.com/media/HyDfNCZlTn5iU/giphy.gif?cid=ecf05e4777yl7dbo1xfha6bx1z5lrl13uq7biv6rs9dqsyoh&ep=v1_gifs_search&rid=giphy.gif&ct=g) + - uses: FantasticFiasco/action-update-license-year@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + path: | + LICENSE + prBody: > + This PR updates the copyright license for this new year! If you're reading this while you're celebrating, enjoy! Don't worry about this one :blush: + + ![Happy new year!](https://media.giphy.com/media/HyDfNCZlTn5iU/giphy.gif?cid=ecf05e4777yl7dbo1xfha6bx1z5lrl13uq7biv6rs9dqsyoh&ep=v1_gifs_search&rid=giphy.gif&ct=g) + transform: (?<=YEAR:\s)(?\d{4})?-?(\d{4})? diff --git a/.gitignore b/.gitignore index 54b8e1e..d224dad 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ po/*~ rsconnect/ inst/doc docs +scratch.R diff --git a/.lintr b/.lintr index 66a6688..e26a154 100644 --- a/.lintr +++ b/.lintr @@ -1,6 +1,5 @@ linters: all_linters( indentation_linter = NULL, # unstable as of lintr 3.1.0 - extraction_operator_linter = NULL, # lints auto-generated vignette setup chunks implicit_integer_linter = NULL, # turn off due to multiple integerish values used duplicate_argument_linter = NULL, # due to cli_bullets object_name_linter = NULL, # due to S3 methods @@ -20,8 +19,5 @@ exclusions: list( ), "vignettes" = list( undesirable_function_linter = Inf - ), - # do no attempt to lint auto-generated files - "R/RcppExports.R", - "R/cpp11.R" + ) ) diff --git a/DESCRIPTION b/DESCRIPTION index bf2a6c8..2f7f186 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,15 +1,24 @@ -Package: vimc.rpkg.template -Title: Your Package Title in Title Case -Version: 0.0.0.9000 +Package: vimcheck +Title: Diagnostics for Vaccine Impact Modelling Consortium Burden and + Impact Estimates +Version: 0.0.1 Authors@R: c( person("Pratik", "Gupte", , "p.gupte24@imperial.ac.uk", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5294-7819")), + person("Katy", "Gaythorpe", role = "aut", + comment = c(ORCID = "0000-0003-3734-9081")), + person("Xiang", "Li", role = "aut", + comment = c(ORCID = "0000-0002-5945-159X")), + person("Zoë", "Gibney", role = "aut", + comment = c(ORCID = "0009-0002-8114-9984")), person("Imperial College of Science, Technology and Medicine", role = c("cph", "fnd")) ) -Description: Your package description. It must end with a period (".") and - include relevant bibliographical references if applicable, using the - following format: Author et al. (2023) . +Description: Run diagnostics on burden estimates submitted by modellers in + the Vaccine Impact Modelling Consortium (VIMC) and impact estimates + calculated by the VIMC Science & Policy team. License: MIT + file LICENSE +URL: https://github.com/vimc/vimcheck, https://vimc.github.io/vimcheck/ +BugReports: https://github.com/vimc/vimcheck/issues Suggests: knitr, rmarkdown, diff --git a/NAMESPACE b/NAMESPACE index 76b6bbd..6ae9268 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,3 +1,2 @@ # Generated by roxygen2: do not edit by hand -export(get_manual_mean) diff --git a/NEWS.md b/NEWS.md index 349c9d4..b12099e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ -# vimc.rpkg.template 0.0.1 +# vimcheck 0.0.1 -* This project now includes a - [`NEWS.md`](https://r-pkgs.org/other-markdown.html#sec-news) file to inform - users about changes and new features. +- Added GHA workflows to notify of changed dependencies, auto-render `README.md` from `README.Rmd`, and update the copyright year annually. + +- Added reference to VIMC paper (Echeverria-Londono et al. 2021). + +- Added `.gitattributes` marking autogenerated Readme and docs files as such. diff --git a/R/functions.R b/R/functions.R deleted file mode 100644 index 5cf731a..0000000 --- a/R/functions.R +++ /dev/null @@ -1,10 +0,0 @@ -#' Dummy function -#' -#' @description -#' A dummy function for illustrative purposes. -#' -#' @param x A vector of numbers. -#' @export -get_manual_mean <- function(x) { - sum(x) / length(x) -} diff --git a/R/vimc.rpkg.template-package.R b/R/vimcheck.R similarity index 100% rename from R/vimc.rpkg.template-package.R rename to R/vimcheck.R diff --git a/README.Rmd b/README.Rmd index e00c56a..d548395 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,6 +1,6 @@ --- output: github_document -# add bibliography here +bibliography: vignettes/resources/references.json link-citations: true --- @@ -15,40 +15,25 @@ knitr::opts_chunk$set( ) ``` -# vimc.rpkg.template: TAGLINE +# vimcheck: Diagnostics for Vaccine Impact Modelling Consortium burden and impact estimates [![Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept) -[![R build status](https://github.com/vimc/vimc.rpkg.template/workflows/R-CMD-check/badge.svg)](https://github.com/vimc/vimc.rpkg.template/actions/workflows/R-CMD-check.yaml) -[![Codecov test coverage](https://codecov.io/gh/vimc/vimc.rpkg.template/branch/main/graph/badge.svg)](https://app.codecov.io/gh/vimc/vimc.rpkg.template?branch=main) -[![CRAN status](https://www.r-pkg.org/badges/version/vimc.rpkg.template)](https://CRAN.R-project.org/package=vimc.rpkg.template) +[![R build status](https://github.com/vimc/vimcheck/workflows/R-CMD-check/badge.svg)](https://github.com/vimc/vimcheck/actions/workflows/R-CMD-check.yaml) +[![Codecov test coverage](https://codecov.io/gh/vimc/vimcheck/branch/main/graph/badge.svg)](https://app.codecov.io/gh/vimc/vimcheck?branch=main) +[![CRAN status](https://www.r-pkg.org/badges/version/vimcheck)](https://CRAN.R-project.org/package=vimcheck) -_vimc.rpkg.template_ is a template package and repository on which future VIMC R packages are based. - -To use this template, select _vimc.rpkg.template_ from the drop-down menu under **Repository template** when creating a new repository in the VIMC GitHub organisation. -Replace all instances of `"vimc.rpkg.template"` with your package name. Make sure to also: - -1. Edit the `DESCRIPTION` as appropriate with the correct package information, including authors; - -2. Edit the files in `R/`, `tests/`, and `vignettes/` to suit your package; - -3. Add spell check by running `usethis::use_spell_check(lang = "en-GB")`; - -4. Remove these instructions from `README.Rmd`, and re-render the `.md` file using `devtools::render_readme()`. +_vimcheck_ is an R package for running diagnostic checks on burden estimates submitted to the Vaccine Impact Modelling Consortium (VIMC), and on vaccine impact estimates calculated by VIMC. ## Installation -**NOTE:** Remove or comment out installation sources as appropriate. - -**Remember** to add the package to the [VIMC R-universe](https://github.com/vimc/vimc.r-universe.dev). - -You can install the development version of _vimc.rpkg.template_ from the VIMC R-universe with: +You can install the development version of _vimcheck_ from the VIMC R-universe with: ```r installation from R-universe install.packages( - "vimc.rpkg.template", + "vimcheck", repos = c( "https://vimc.r-universe.dev", "https://cloud.r-project.org" ) @@ -59,18 +44,15 @@ or from GitHub [GitHub](https://github.com/) with: ``` r install.packages("pak") -pak::pak("vimc/vimc.rpkg.template") +pak::pak("vimc/vimcheck") ``` ## Quick start -Add a simple example of using the package's main feature(s) here, with a minimum amount of code. -If preparatory or plotting steps are needed, prefer to hide them to keep focus on the package functionality. +WIP. ## Related projects -Add information and links to related projects, such as research papers or packages, here. +VIMC impact assessment workflows are described in @echeverria-londono2021. ## References - -Space for references: REMOVE this text. diff --git a/README.md b/README.md index 896e83e..b0fb496 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# vimc.rpkg.template: TAGLINE +# vimcheck: Diagnostics for Vaccine Impact Modelling Consortium burden and impact estimates @@ -10,47 +10,26 @@ yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept) [![R build -status](https://github.com/vimc/vimc.rpkg.template/workflows/R-CMD-check/badge.svg)](https://github.com/vimc/vimc.rpkg.template/actions/workflows/R-CMD-check.yaml) +status](https://github.com/vimc/vimcheck/workflows/R-CMD-check/badge.svg)](https://github.com/vimc/vimcheck/actions/workflows/R-CMD-check.yaml) [![Codecov test -coverage](https://codecov.io/gh/vimc/vimc.rpkg.template/branch/main/graph/badge.svg)](https://app.codecov.io/gh/vimc/vimc.rpkg.template?branch=main) +coverage](https://codecov.io/gh/vimc/vimcheck/branch/main/graph/badge.svg)](https://app.codecov.io/gh/vimc/vimcheck?branch=main) [![CRAN -status](https://www.r-pkg.org/badges/version/vimc.rpkg.template)](https://CRAN.R-project.org/package=vimc.rpkg.template) +status](https://www.r-pkg.org/badges/version/vimcheck)](https://CRAN.R-project.org/package=vimcheck) -*vimc.rpkg.template* is a template package and repository on which -future VIMC R packages are based. - -To use this template, select *vimc.rpkg.template* from the drop-down -menu under **Repository template** when creating a new repository in the -VIMC GitHub organisation. Replace all instances of -`"vimc.rpkg.template"` with your package name. Make sure to also: - -1. Edit the `DESCRIPTION` as appropriate with the correct package - information, including authors; - -2. Edit the files in `R/`, `tests/`, and `vignettes/` to suit your - package; - -3. Add spell check by running - `usethis::use_spell_check(lang = "en-GB")`; - -4. Remove these instructions from `README.Rmd`, and re-render the `.md` - file using `devtools::render_readme()`. +*vimcheck* is an R package for running diagnostic checks on burden +estimates submitted to the Vaccine Impact Modelling Consortium (VIMC), +and on vaccine impact estimates calculated by VIMC. ## Installation -**NOTE:** Remove or comment out installation sources as appropriate. - -**Remember** to add the package to the [VIMC -R-universe](https://github.com/vimc/vimc.r-universe.dev). - -You can install the development version of *vimc.rpkg.template* from the -VIMC R-universe with: +You can install the development version of *vimcheck* from the VIMC +R-universe with: ``` r installation from R-universe install.packages( - "vimc.rpkg.template", + "vimcheck", repos = c( "https://vimc.r-universe.dev", "https://cloud.r-project.org" ) @@ -61,20 +40,31 @@ or from GitHub [GitHub](https://github.com/) with: ``` r install.packages("pak") -pak::pak("vimc/vimc.rpkg.template") +pak::pak("vimc/vimcheck") ``` ## Quick start -Add a simple example of using the package’s main feature(s) here, with a -minimum amount of code. If preparatory or plotting steps are needed, -prefer to hide them to keep focus on the package functionality. +WIP. ## Related projects -Add information and links to related projects, such as research papers -or packages, here. +VIMC impact assessment workflows are described in Echeverria-Londono et +al. ([2021](#ref-echeverria-londono2021)). ## References -Space for references: REMOVE this text. +
+ +
+ +Echeverria-Londono, Susy, Xiang Li, Jaspreet Toor, Margaret J. De +Villiers, Shevanthi Nayagam, Timothy B. Hallett, Kaja Abbas, et al. +2021. “How Can the Public Health Impact of Vaccination Be Estimated?” +*BMC Public Health* 21 (1): 2049. +. + +
+ +
diff --git a/inst/WORDLIST b/inst/WORDLIST index 5d6e36f..18777d0 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -1,9 +1,17 @@ +BMC Codecov +Echeverria +GHA +Hallett +Jaspreet +Kaja +Londono +Nayagam ORCID -TAGLINE +Shevanthi +Susy +Toor VIMC -doi +WIP +autogenerated pkgdown -rpkg -vimc -zenodo diff --git a/man/get_manual_mean.Rd b/man/get_manual_mean.Rd deleted file mode 100644 index 05b3db4..0000000 --- a/man/get_manual_mean.Rd +++ /dev/null @@ -1,14 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/functions.R -\name{get_manual_mean} -\alias{get_manual_mean} -\title{Dummy function} -\usage{ -get_manual_mean(x) -} -\arguments{ -\item{x}{A vector of numbers.} -} -\description{ -A dummy function for illustrative purposes. -} diff --git a/man/vimc.rpkg.template-package.Rd b/man/vimc.rpkg.template-package.Rd deleted file mode 100644 index 4fa3a28..0000000 --- a/man/vimc.rpkg.template-package.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/vimc.rpkg.template-package.R -\docType{package} -\name{vimc.rpkg.template-package} -\alias{vimc.rpkg.template} -\alias{vimc.rpkg.template-package} -\title{vimc.rpkg.template: Your Package Title in Title Case} -\description{ -Your package description. It must end with a period (".") and include relevant bibliographical references if applicable, using the following format: Author et al. (2023) \doi{10.5281/zenodo.6619350}. -} -\author{ -\strong{Maintainer}: Pratik Gupte \email{p.gupte24@imperial.ac.uk} (\href{https://orcid.org/0000-0001-5294-7819}{ORCID}) - -Other contributors: -\itemize{ - \item Imperial College of Science, Technology and Medicine [copyright holder, funder] -} - -} -\keyword{internal} diff --git a/man/vimcheck-package.Rd b/man/vimcheck-package.Rd new file mode 100644 index 0000000..c26fbd9 --- /dev/null +++ b/man/vimcheck-package.Rd @@ -0,0 +1,36 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/vimcheck.R +\docType{package} +\name{vimcheck-package} +\alias{vimcheck} +\alias{vimcheck-package} +\title{vimcheck: Diagnostics for Vaccine Impact Modelling Consortium Burden and Impact Estimates} +\description{ +Run diagnostics on burden estimates submitted by modellers in the Vaccine Impact Modelling Consortium (VIMC) and impact estimates calculated by the VIMC Science & Policy team. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/vimc/vimcheck} + \item \url{https://vimc.github.io/vimcheck/} + \item Report bugs at \url{https://github.com/vimc/vimcheck/issues} +} + +} +\author{ +\strong{Maintainer}: Pratik Gupte \email{p.gupte24@imperial.ac.uk} (\href{https://orcid.org/0000-0001-5294-7819}{ORCID}) + +Authors: +\itemize{ + \item Katy Gaythorpe (\href{https://orcid.org/0000-0003-3734-9081}{ORCID}) + \item Xiang Li (\href{https://orcid.org/0000-0002-5945-159X}{ORCID}) + \item Zoë Gibney (\href{https://orcid.org/0009-0002-8114-9984}{ORCID}) +} + +Other contributors: +\itemize{ + \item Imperial College of Science, Technology and Medicine [copyright holder, funder] +} + +} +\keyword{internal} diff --git a/tests/spelling.R b/tests/spelling.R index d60e024..a8cf85b 100644 --- a/tests/spelling.R +++ b/tests/spelling.R @@ -1,7 +1,6 @@ -if (requireNamespace("spelling", quietly = TRUE)) { +if (requireNamespace('spelling', quietly = TRUE)) spelling::spell_check_test( vignettes = TRUE, error = FALSE, skip_on_cran = TRUE ) -} diff --git a/tests/testthat.R b/tests/testthat.R index cc799fa..5e3689c 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -7,6 +7,6 @@ # * https://testthat.r-lib.org/articles/special-files.html library(testthat) -library(vimc.rpkg.template) +library(vimcheck) -test_check("vimc.rpkg.template") +test_check("vimcheck") diff --git a/tests/testthat/helper-state.R b/tests/testthat/helper-state.R index afb0459..1b2fb85 100644 --- a/tests/testthat/helper-state.R +++ b/tests/testthat/helper-state.R @@ -5,15 +5,6 @@ # function, or more conveniently with the `withr` package. # We add a test on R >= 4.0.0 because some functions such as # `globalCallingHandlers()` did not exist before. -get_pars_toreset <- function() { - pars <- par(no.readonly = TRUE) - # The following params are set and modified automatically by plot(), as - # documented in ?plot.window() and we: - # 1. have no control over them - # 2. do not care about resetting them - pars <- pars[!names(pars) %in% c("usr", "xaxp", "yaxp")] -} - if (getRversion() >= "4.0.0") { testthat::set_state_inspector(function() { list( diff --git a/tests/testthat/test-functions.R b/tests/testthat/test-functions.R deleted file mode 100644 index 11d5eca..0000000 --- a/tests/testthat/test-functions.R +++ /dev/null @@ -1,7 +0,0 @@ -test_that("function works", { - x <- c(2, 3) - expect_equal( - get_manual_mean(x), - mean(x) - ) -}) diff --git a/vignettes/resources/references.json b/vignettes/resources/references.json new file mode 100644 index 0000000..3a691c0 --- /dev/null +++ b/vignettes/resources/references.json @@ -0,0 +1,3 @@ +[ + {"id":"echeverria-londono2021","abstract":"Abstract\n \n Background\n Deaths due to vaccine preventable diseases cause a notable proportion of mortality worldwide. To quantify the importance of vaccination, it is necessary to estimate the burden averted through vaccination. The Vaccine Impact Modelling Consortium (VIMC) was established to estimate the health impact of vaccination.\n \n \n Methods\n We describe the methods implemented by the VIMC to estimate impact by calendar year, birth year and year of vaccination (YoV). The calendar and birth year methods estimate impact in a particular year and over the lifetime of a particular birth cohort, respectively. The YoV method estimates the impact of a particular year’s vaccination activities through the use of impact ratios which have no stratification and stratification by activity type and/or birth cohort. Furthermore, we detail an impact extrapolation (IE) method for use between coverage scenarios. We compare the methods, focusing on YoV for hepatitis B, measles and yellow fever.\n \n \n Results\n We find that the YoV methods estimate similar impact with routine vaccinations but have greater yearly variation when campaigns occur with the birth cohort stratification. The IE performs well for the YoV methods, providing a time-efficient mechanism for updates to impact estimates.\n \n \n Conclusions\n These methods provide a robust set of approaches to quantify vaccination impact; however it is vital that the area of impact estimation continues to develop in order to capture the full effect of immunisation.","accessed":{"date-parts":[["2025",12,9]]},"author":[{"family":"Echeverria-Londono","given":"Susy"},{"family":"Li","given":"Xiang"},{"family":"Toor","given":"Jaspreet"},{"family":"De Villiers","given":"Margaret J."},{"family":"Nayagam","given":"Shevanthi"},{"family":"Hallett","given":"Timothy B."},{"family":"Abbas","given":"Kaja"},{"family":"Jit","given":"Mark"},{"family":"Klepac","given":"Petra"},{"family":"Jean","given":"Kévin"},{"family":"Garske","given":"Tini"},{"family":"Ferguson","given":"Neil M."},{"family":"Gaythorpe","given":"Katy A. M."}],"citation-key":"echeverria-londono2021","container-title":"BMC Public Health","container-title-short":"BMC Public Health","DOI":"10.1186/s12889-021-12040-9","ISSN":"1471-2458","issue":"1","issued":{"date-parts":[["2021",12]]},"language":"en","page":"2049","source":"DOI.org (Crossref)","title":"How can the public health impact of vaccination be estimated?","type":"article-journal","URL":"https://bmcpublichealth.biomedcentral.com/articles/10.1186/s12889-021-12040-9","volume":"21"} +] diff --git a/vignettes/vimc-rpkg-template.Rmd b/vignettes/vimcheck.Rmd similarity index 86% rename from vignettes/vimc-rpkg-template.Rmd rename to vignettes/vimcheck.Rmd index 2d33504..4860d6a 100644 --- a/vignettes/vimc-rpkg-template.Rmd +++ b/vignettes/vimcheck.Rmd @@ -1,8 +1,8 @@ --- -title: "vimc-rpkg-template" +title: "vimcheck" output: rmarkdown::html_vignette vignette: > - %\VignetteIndexEntry{vimc-rpkg-template} + %\VignetteIndexEntry{vimcheck} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- @@ -15,7 +15,7 @@ knitr::opts_chunk$set( ``` ```{r setup} -library(vimc.rpkg.template) +library(vimcheck) ``` This is a special vignette, which shares the same name as the package. diff --git a/vimc.rpkg.template.Rproj b/vimcheck.Rproj similarity index 100% rename from vimc.rpkg.template.Rproj rename to vimcheck.Rproj