From 9e806434e7dd744dbad7364d77fc18427015c01a Mon Sep 17 00:00:00 2001 From: Ben Bolker Date: Wed, 26 May 2021 20:20:40 -0400 Subject: [PATCH] more pkgdown stuff [skip ci] --- DESCRIPTION | 4 +- Makefile | 3 ++ README.md | 24 +++++++----- docs/404.html | 5 +-- docs/ChangeLog.html | 5 +-- docs/LICENSE-text.html | 5 +-- docs/TODO.html | 5 +-- docs/articles/calibration.html | 5 +-- .../empty-anchor.js | 15 ++++++++ docs/articles/index.html | 9 +---- docs/articles/model.html | 5 +-- docs/articles/new_getting_started.html | 13 +++---- docs/articles/testing_flow.html | 7 +--- docs/authors.html | 9 +++-- docs/index.html | 38 +++++++++++-------- docs/pkgdown.yml | 3 +- docs/reference/McMasterPandemic-package.html | 5 +-- docs/reference/add_d_log.html | 9 ++--- docs/reference/aggregate.pansim.html | 5 +-- docs/reference/calc_conv.html | 5 +-- docs/reference/calibrate.html | 5 +-- docs/reference/calibrate_comb.html | 5 +-- docs/reference/col_multiply.html | 5 +-- docs/reference/condense.html | 5 +-- docs/reference/condense.pansim.html | 5 +-- docs/reference/condense_age.html | 5 +-- docs/reference/describe_params.html | 5 +-- docs/reference/dev_is_tikz.html | 5 +-- docs/reference/do_step.html | 5 +-- docs/reference/expand_stateval_age.html | 5 +-- docs/reference/expand_stateval_testing.html | 5 +-- docs/reference/fix_pars.html | 5 +-- docs/reference/forecast_ensemble.html | 5 +-- docs/reference/forecast_sim.html | 5 +-- docs/reference/getData.html | 5 +-- docs/reference/get_GI_moments.html | 5 +-- docs/reference/get_Gbar.html | 5 +-- docs/reference/get_R0.html | 5 +-- docs/reference/get_evec.html | 5 +-- docs/reference/get_kernel_moments.html | 5 +-- docs/reference/get_opt_pars.html | 5 +-- docs/reference/get_r.html | 5 +-- docs/reference/gradfun.html | 5 +-- docs/reference/index.html | 5 +-- docs/reference/invlink_trans.html | 5 +-- docs/reference/make_betavec.html | 5 +-- docs/reference/make_delay_kernel.html | 5 +-- docs/reference/make_jac.html | 5 +-- docs/reference/make_ratemat.html | 5 +-- docs/reference/make_state.html | 5 +-- docs/reference/make_test_wtsvec.html | 5 +-- docs/reference/mk_agecats.html | 5 +-- docs/reference/mle_fun.html | 5 +-- docs/reference/nlist.html | 5 +-- docs/reference/non_expanded_states.html | 5 +-- docs/reference/ontario_data.html | 5 +-- docs/reference/ontario_fits.html | 5 +-- docs/reference/pivot.html | 5 +-- docs/reference/plot.pansim.html | 5 +-- docs/reference/plot.predict_pansim.html | 5 +-- docs/reference/predict.fit_pansim.html | 5 +-- docs/reference/print.params_pansim.html | 5 +-- docs/reference/rExp.html | 5 +-- docs/reference/read_params.html | 5 +-- docs/reference/restore.html | 5 +-- docs/reference/run_sim.html | 5 +-- docs/reference/run_sim_break.html | 5 +-- docs/reference/run_sim_loglin.html | 5 +-- docs/reference/run_sim_mobility.html | 5 +-- docs/reference/run_sim_range.html | 5 +-- docs/reference/show_ratemat.html | 5 +-- docs/reference/summary.params_pansim.html | 5 +-- docs/reference/testify.html | 5 +-- docs/reference/texify.html | 5 +-- docs/reference/trans_state_vars.html | 5 +-- docs/reference/unpack.html | 5 +-- docs/reference/update.params_pansim.html | 5 +-- docs/reference/update_foi.html | 5 +-- docs/reference/vis_model.html | 5 +-- docs/reference/write_params.html | 5 +-- {vignettes => misc}/farr.rmd | 0 81 files changed, 145 insertions(+), 334 deletions(-) create mode 100644 docs/articles/calibration_files/accessible-code-block-0.0.1/empty-anchor.js rename {vignettes => misc}/farr.rmd (100%) diff --git a/DESCRIPTION b/DESCRIPTION index 8969b3db..b3eaaac5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,7 +8,9 @@ Authors@R: c(person("Ben","Bolker",email="bolker@mcmaster.ca",role=c("aut","cre" person("Mike Li",role="aut"), person("Jonathan Dushoff",role="aut"), person("Zach Levine", role="ctb"), - person("Matthew So", role="ctb")) + person("Matthew So", role="ctb"), + person("Irena Papst", role="ctb") + ) Depends: R (>= 3.5.0) Imports: lattice, diff --git a/Makefile b/Makefile index 072ec5fd..6641ccf7 100644 --- a/Makefile +++ b/Makefile @@ -148,6 +148,9 @@ pkgcheck: clean: find . \( -name "\.#*" -o -name "*~" -o -name ".Rhistory" \) -exec rm {} \; +site-update-lazy: + echo "pkgdown::build_site(lazy=TRUE)" | $(R) --slave + site-update: echo "pkgdown::build_site()" | $(R) --slave diff --git a/README.md b/README.md index e45a7bc2..7e542597 100644 --- a/README.md +++ b/README.md @@ -4,35 +4,41 @@ [![R-CMD-check](https://github.com/bbolker/McMasterPandemic/workflows/R-CMD-check/badge.svg)](https://github.com/bbolker/McMasterPandemic/actions) -Compartmental epidemic models for forecasting and analysis of infectious disease pandemics: contributions from Ben Bolker, Jonathan Dushoff, David Earn, Morgan Kain, Michael Li, Irena Papst (in alphabetical order). Feedback is welcome at the [issues list](https://github.com/bbolker/McMasterPandemic/issues), or e-mail us. +Compartmental epidemic models for forecasting and analysis of infectious disease pandemics. Feedback is welcome at the [issues list](https://github.com/bbolker/McMasterPandemic/issues). ### Installation The repository contains an R package and various workflows/analyses. You can fork/clone the repository (from [here](https://github.com/bbolker/McMasterPandemic)) and install locally or use `remotes::install_github("bbolker/McMasterPandemic")` to install the package. You will need to first install the developer version of `bbmle` (`remotes::install_github("bbolker/bbmle")`) before installing `McMasterPandemic`. +### Documentation + +See the accompanying [pkgdown site](https://bbolker.github.io/McMasterPandemic). + +- Functions are under the `Reference` tab. +- Vignettes (under construction!) are under `Articles` + ### For developers * to re-install the package, including re-building and incorporating vignettes, use `make build` -* If you modify function arguments, you should change the roxygen documentation accordingly. If you change the roxygen documentation, please use `make doc-update` to update the `.Rd` files. -* **please test/check the package periodically** as you go (use `make pkgcheck` and `make pkgtest` from the shell or `devtools::check()` and `devtools::test()` from within R). (Tests are also run on [GitHub Actions](https://github.com/bbolker/McMasterPandemic/actions); if you want to skip CI testing, e.g. for a trivial commit, put `[skip ci]` somewhere in your commit message.) Please don't make a habit of pushing without testing. -* Code that is used in the refactoring process should go in the top-level refactor folder. +* re-build the `pkgdown` site with `make site-update-lazy` (to rebuild just changed files) or `make site-update` (to be thorough) (or `pkgdown::build_site()`) +* it's OK to push *small* changes to the master branch; use your own branch + pull request for anything non-trivial +* If you modify function arguments, please update the roxygen documentation and use `make doc-update` (or `devtools::document`) to update the `.Rd` files. +* **Check the package periodically** as you go (use `make pkgcheck` and `make pkgtest` from the shell or `devtools::check()` and `devtools::test()` from within R). (Tests are also run on [GitHub Actions](https://github.com/bbolker/McMasterPandemic/actions); if you want to skip CI testing, e.g. for a trivial commit, put `[skip ci]` somewhere in your commit message.) Don't push without checking. +* Code that is used in the refactoring process should go in the top-level `refactor` folder. * Slow tests are skipped by default; this process is controlled by the presence of a `MACPAN_TEST_LEVEL` environment (shell) variable. Many of the test files contain this code: ```r testLevel <- if (nzchar(s <- Sys.getenv("MACPAN_TEST_LEVEL"))) as.numeric(s) else 1 ``` which sets `testLevel` to a default value of 1 unless the environment variable is found. You can set this environment variable outside of your R session (e.g. via `export MACPAN_TEST_LEVEL=2` in a bash shell), or via `Sys.setenv(MACPAN_TEST_LEVEL=2)` from within R. In principle this mechanism allows for a hierarchy of slowness; at present only 1 and >1 are distinguished. -### Documentation - -The [documentation](https://bbolker.github.io/McMasterPandemic) is a little bit scattered right now, working on cleaning it up and making it easily accessible. +## Obsolete documentation -In addition to the standard short descriptions of the functions (`help(package="McMasterPandemic")`), stuff can be found: +(Keeping links here for now) * in the vignettes (look at the source code in the [vignettes] directory or `vignette(, package="McMasterPandemic")`) * `getting_started` * `model`: design decisions and information for developers * `calibration` (**very out of date**) - * `farr`: stuff on Farr's law and phenomenological curve-fitting (**very incomplete and likely to remain so for now**) * `testing_flow`: incorporating testing dynamics (**ditto**) * `McMasterReport.Rnw`: this is a more or less up-to-date description of calibration to Ontario data * `ontario_calibration_report.html`: more technical and less up-to-date than the preceding document diff --git a/docs/404.html b/docs/404.html index 578abffd..a921a6a0 100644 --- a/docs/404.html +++ b/docs/404.html @@ -96,14 +96,11 @@ <li> <a href="articles/calibration.html">Model calibration</a> </li> - <li> - <a href="articles/farr.html">Cumulative curves, Farr's law, and all that</a> - </li> <li> <a href="articles/model.html">The 'McMaster Pandemic' model</a> </li> <li> - <a href="articles/new_getting_started.html">Getting Started (markdown version)</a> + <a href="articles/new_getting_started.html">Getting started (markdown version)</a> </li> <li> <a href="articles/testing_flow.html">Incorporating testing dynamics in the MacPan model</a> diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 91b0fc26..62fd27c1 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -96,14 +96,11 @@ <li> <a href="articles/calibration.html">Model calibration</a> </li> - <li> - <a href="articles/farr.html">Cumulative curves, Farr's law, and all that</a> - </li> <li> <a href="articles/model.html">The 'McMaster Pandemic' model</a> </li> <li> - <a href="articles/new_getting_started.html">Getting Started (markdown version)</a> + <a href="articles/new_getting_started.html">Getting started (markdown version)</a> </li> <li> <a href="articles/testing_flow.html">Incorporating testing dynamics in the MacPan model</a> diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index fa457cf7..ff8d4958 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -96,14 +96,11 @@ <li> <a href="articles/calibration.html">Model calibration</a> </li> - <li> - <a href="articles/farr.html">Cumulative curves, Farr's law, and all that</a> - </li> <li> <a href="articles/model.html">The 'McMaster Pandemic' model</a> </li> <li> - <a href="articles/new_getting_started.html">Getting Started (markdown version)</a> + <a href="articles/new_getting_started.html">Getting started (markdown version)</a> </li> <li> <a href="articles/testing_flow.html">Incorporating testing dynamics in the MacPan model</a> diff --git a/docs/TODO.html b/docs/TODO.html index b983d8f9..a40c5c54 100644 --- a/docs/TODO.html +++ b/docs/TODO.html @@ -96,14 +96,11 @@ <li> <a href="articles/calibration.html">Model calibration</a> </li> - <li> - <a href="articles/farr.html">Cumulative curves, Farr's law, and all that</a> - </li> <li> <a href="articles/model.html">The 'McMaster Pandemic' model</a> </li> <li> - <a href="articles/new_getting_started.html">Getting Started (markdown version)</a> + <a href="articles/new_getting_started.html">Getting started (markdown version)</a> </li> <li> <a href="articles/testing_flow.html">Incorporating testing dynamics in the MacPan model</a> diff --git a/docs/articles/calibration.html b/docs/articles/calibration.html index b2801af5..5752f6ec 100644 --- a/docs/articles/calibration.html +++ b/docs/articles/calibration.html @@ -56,14 +56,11 @@ <li> <a href="../articles/calibration.html">Model calibration</a> </li> - <li> - <a href="../articles/farr.html">Cumulative curves, Farr's law, and all that</a> - </li> <li> <a href="../articles/model.html">The 'McMaster Pandemic' model</a> </li> <li> - <a href="../articles/new_getting_started.html">Getting Started (markdown version)</a> + <a href="../articles/new_getting_started.html">Getting started (markdown version)</a> </li> <li> <a href="../articles/testing_flow.html">Incorporating testing dynamics in the MacPan model</a> diff --git a/docs/articles/calibration_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/calibration_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 00000000..ca349fd6 --- /dev/null +++ b/docs/articles/calibration_files/accessible-code-block-0.0.1/empty-anchor.js @@ -0,0 +1,15 @@ +// Hide empty <a> tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> +// v0.0.1 +// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. + +document.addEventListener('DOMContentLoaded', function() { + const codeList = document.getElementsByClassName("sourceCode"); + for (var i = 0; i < codeList.length; i++) { + var linkList = codeList[i].getElementsByTagName('a'); + for (var j = 0; j < linkList.length; j++) { + if (linkList[j].innerHTML === "") { + linkList[j].setAttribute('aria-hidden', 'true'); + } + } + } +}); diff --git a/docs/articles/index.html b/docs/articles/index.html index dbe04d62..014b48a5 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -96,14 +96,11 @@ <li> <a href="../articles/calibration.html">Model calibration</a> </li> - <li> - <a href="../articles/farr.html">Cumulative curves, Farr's law, and all that</a> - </li> <li> <a href="../articles/model.html">The 'McMaster Pandemic' model</a> </li> <li> - <a href="../articles/new_getting_started.html">Getting Started (markdown version)</a> + <a href="../articles/new_getting_started.html">Getting started (markdown version)</a> </li> <li> <a href="../articles/testing_flow.html">Incorporating testing dynamics in the MacPan model</a> @@ -141,11 +138,9 @@ <h3>All vignettes</h3> <dl> <dt><a href="calibration.html">Model calibration</a></dt> <dd></dt> - <dt><a href="farr.html">Cumulative curves, Farr's law, and all that</a></dt> - <dd></dt> <dt><a href="model.html">The 'McMaster Pandemic' model</a></dt> <dd></dt> - <dt><a href="new_getting_started.html">Getting Started (markdown version)</a></dt> + <dt><a href="new_getting_started.html">Getting started (markdown version)</a></dt> <dd></dt> <dt><a href="testing_flow.html">Incorporating testing dynamics in the MacPan model</a></dt> <dd></dt> diff --git a/docs/articles/model.html b/docs/articles/model.html index af3bf7d1..a86c7085 100644 --- a/docs/articles/model.html +++ b/docs/articles/model.html @@ -56,14 +56,11 @@ <li> <a href="../articles/calibration.html">Model calibration</a> </li> - <li> - <a href="../articles/farr.html">Cumulative curves, Farr's law, and all that</a> - </li> <li> <a href="../articles/model.html">The 'McMaster Pandemic' model</a> </li> <li> - <a href="../articles/new_getting_started.html">Getting Started (markdown version)</a> + <a href="../articles/new_getting_started.html">Getting started (markdown version)</a> </li> <li> <a href="../articles/testing_flow.html">Incorporating testing dynamics in the MacPan model</a> diff --git a/docs/articles/new_getting_started.html b/docs/articles/new_getting_started.html index 2d4e7d18..06a19636 100644 --- a/docs/articles/new_getting_started.html +++ b/docs/articles/new_getting_started.html @@ -5,13 +5,13 @@ <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<title>Getting Started (markdown version) • McMasterPandemic +Getting started (markdown version) • McMasterPandemic - + -

Compartmental epidemic models for forecasting and analysis of infectious disease pandemics: contributions from Ben Bolker, Jonathan Dushoff, David Earn, Morgan Kain, Michael Li, Irena Papst (in alphabetical order). Feedback is welcome at the issues list, or e-mail us.

+

Compartmental epidemic models for forecasting and analysis of infectious disease pandemics. Feedback is welcome at the issues list.

Installation

The repository contains an R package and various workflows/analyses. You can fork/clone the repository (from here) and install locally or use remotes::install_github("bbolker/McMasterPandemic") to install the package. You will need to first install the developer version of bbmle (remotes::install_github("bbolker/bbmle")) before installing McMasterPandemic.

+
+

+Documentation

+

See the accompanying pkgdown site.

+ +

For developers

 testLevel <- if (nzchar(s <- Sys.getenv("MACPAN_TEST_LEVEL"))) as.numeric(s) else 1

which sets testLevel to a default value of 1 unless the environment variable is found. You can set this environment variable outside of your R session (e.g. via export MACPAN_TEST_LEVEL=2 in a bash shell), or via Sys.setenv(MACPAN_TEST_LEVEL=2) from within R. In principle this mechanism allows for a hierarchy of slowness; at present only 1 and >1 are distinguished.

-
-

-Documentation

-

The documentation is a little bit scattered right now, working on cleaning it up and making it easily accessible.

-

In addition to the standard short descriptions of the functions (help(package="McMasterPandemic")), stuff can be found:

+
+

+Obsolete documentation

+

(Keeping links here for now)

  • in the vignettes (look at the source code in the [vignettes] directory or vignette(<title>, package="McMasterPandemic"))
      @@ -131,8 +139,6 @@

    • calibration (very out of date)
    • -farr: stuff on Farr’s law and phenomenological curve-fitting (very incomplete and likely to remain so for now)
    • -
    • testing_flow: incorporating testing dynamics (ditto)
  • @@ -145,12 +151,12 @@

  • issues list on github

More bits and pieces: notes/refactor.Rmd, testing.md, reimplementation.md; Shiny app (corresponding GitHub repo).

-

DISCLAIMER

All use of this package is at your own risk. Quantitative forecasts are only as good as their parameter estimates.

+
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 546323cf..49fb6355 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,9 +3,8 @@ pkgdown: 1.6.1 pkgdown_sha: ~ articles: calibration: calibration.html - farr: farr.html model: model.html new_getting_started: new_getting_started.html testing_flow: testing_flow.html -last_built: 2021-05-27T00:03Z +last_built: 2021-05-27T00:20Z diff --git a/docs/reference/McMasterPandemic-package.html b/docs/reference/McMasterPandemic-package.html index 191015a7..5999ca52 100644 --- a/docs/reference/McMasterPandemic-package.html +++ b/docs/reference/McMasterPandemic-package.html @@ -98,14 +98,11 @@
  • Model calibration
  • -
  • - Cumulative curves, Farr's law, and all that -
  • The 'McMaster Pandemic' model
  • - Getting Started (markdown version) + Getting started (markdown version)
  • Incorporating testing dynamics in the MacPan model diff --git a/docs/reference/add_d_log.html b/docs/reference/add_d_log.html index f1b68d5e..6649225d 100644 --- a/docs/reference/add_d_log.html +++ b/docs/reference/add_d_log.html @@ -97,14 +97,11 @@
  • Model calibration
  • -
  • - Cumulative curves, Farr's law, and all that -
  • The 'McMaster Pandemic' model
  • - Getting Started (markdown version) + Getting started (markdown version)
  • Incorporating testing dynamics in the MacPan model @@ -156,9 +153,9 @@

    Arg

    Examples

    add_d_log(~dnorm(a,b,c))
    #> ~dnorm(a, b, c, log = TRUE) -#> <environment: 0x55c67f4fb080>
    add_d_log(~sum(dnorm(a,b,c))) +#> <environment: 0x55c7770dfa20>
    add_d_log(~sum(dnorm(a,b,c)))
    #> ~sum(dnorm(a, b, c, log = TRUE)) -#> <environment: 0x55c67f4fb080>
    +#> <environment: 0x55c7770dfa20>