There is a newer version of this record available.

Software Open Access

reconhub/incidence: Incidence version 1.6.0

Thibaut Jombart; Zhian N. Kamvar; Jun Cai; Juliet Pulliam; Sarah Chisholm; Rich FitzJohn; Jakob Schumacher; Sangeeta Bhatia


Dublin Core Export

<?xml version='1.0' encoding='utf-8'?>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
  <dc:creator>Thibaut Jombart</dc:creator>
  <dc:creator>Zhian N. Kamvar</dc:creator>
  <dc:creator>Jun Cai</dc:creator>
  <dc:creator>Juliet Pulliam</dc:creator>
  <dc:creator>Sarah Chisholm</dc:creator>
  <dc:creator>Rich FitzJohn</dc:creator>
  <dc:creator>Jakob Schumacher</dc:creator>
  <dc:creator>Sangeeta Bhatia</dc:creator>
  <dc:date>2019-03-05</dc:date>
  <dc:description>The changes in this version are small, but the impact changes the behavior, so the minor version number is bumped. This updates first_date to NOT override standard = TRUE. This changes behavior because first_date used to automatically set standard = FALSE.
The change to having standard supersede first_date is more consistent with normal behavior and gives users more freedom in the end. Much thanks goes to @caijun for pointing this out and elaborating patiently.
To alert users to the change while minimizing annoyance, a one-time warning is now issued if standard is not specified with first_date. This can be explicitly turned off by setting an the incidence.warn.first_date option to FALSE (as described in the warning):
library("incidence")
d &lt;- Sys.Date() + sample(-3:10, 10, replace = TRUE)
Sys.Date() - 10
#&gt; [1] "2019-02-23"

If both standard and first_datespecified, no warning
incidence(d, interval = "week", first_date = Sys.Date() - 10, standard = TRUE)
#&gt; &lt;incidence object&gt;
#&gt; [10 cases from days 2019-02-18 to 2019-03-11]
#&gt; [10 cases from ISO weeks 2019-W08 to 2019-W11]
#&gt; 
#&gt; $counts: matrix with 4 rows and 1 columns
#&gt; $n: 10 cases in total
#&gt; $dates: 4 dates marking the left-side of bins
#&gt; $interval: 1 week
#&gt; $timespan: 22 days
#&gt; $cumulative: FALSE

warning issued if standard not specified
incidence(d, interval = "week", first_date = Sys.Date() - 10)
#&gt; Warning in incidence.Date(d, interval = "week", first_date = Sys.Date() - : 
#&gt; 
#&gt; As of incidence version 1.6.0, the default behavior has been modified so that `first_date` no longer overrides `standard`. If you want to use Sys.Date() - 10 as the precise `first_date`, set `standard = FALSE`.
#&gt; 
#&gt; To remove this warning in the future,  explicitly set the `standard` argument OR use `options(incidence.warn.first_date = FALSE)`
#&gt; &lt;incidence object&gt;
#&gt; [10 cases from days 2019-02-18 to 2019-03-11]
#&gt; [10 cases from ISO weeks 2019-W08 to 2019-W11]
#&gt; 
#&gt; $counts: matrix with 4 rows and 1 columns
#&gt; $n: 10 cases in total
#&gt; $dates: 4 dates marking the left-side of bins
#&gt; $interval: 1 week
#&gt; $timespan: 22 days
#&gt; $cumulative: FALSE

no warning issued the second time around.
incidence(d, interval = "week", first_date = Sys.Date() - 10)
#&gt; &lt;incidence object&gt;
#&gt; [10 cases from days 2019-02-18 to 2019-03-11]
#&gt; [10 cases from ISO weeks 2019-W08 to 2019-W11]
#&gt; 
#&gt; $counts: matrix with 4 rows and 1 columns
#&gt; $n: 10 cases in total
#&gt; $dates: 4 dates marking the left-side of bins
#&gt; $interval: 1 week
#&gt; $timespan: 22 days
#&gt; $cumulative: FALSE

&lt;sup&gt;Created on 2019-03-05 by the [reprex package](https://reprex.tidyverse.org) (v0.2.1)&lt;/sup&gt;
Full changes detailed below:

BEHAVIORAL CHANGE

incidence() will no longer allow a non-standard first_date to override
standard = TRUE. The first call to incidence() specifying first_date 
without standard will issue a warning. To use non-standard first dates, 
specify standard = FALSE. To remove the warning, use
options(incidence.warn.first_date = FALSE). See
https://github.com/reconhub/incidence/issues/87 for details.  

MISC

citation("incidence") will now give the proper citation for our article in
F1000 research and the global DOI for archived code. See
https://github.com/reconhub/incidence/pulls/106
Tests have been updated to avoid randomisation errors on R 3.6.0
See https://github.com/reconhub/incidence/issues/107
</dc:description>
  <dc:identifier>https://zenodo.org/record/2584018</dc:identifier>
  <dc:identifier>10.5281/zenodo.2584018</dc:identifier>
  <dc:identifier>oai:zenodo.org:2584018</dc:identifier>
  <dc:relation>url:https://github.com/reconhub/incidence/tree/1.6.0</dc:relation>
  <dc:relation>doi:10.5281/zenodo.1404718</dc:relation>
  <dc:rights>info:eu-repo/semantics/openAccess</dc:rights>
  <dc:title>reconhub/incidence: Incidence version 1.6.0</dc:title>
  <dc:type>info:eu-repo/semantics/other</dc:type>
  <dc:type>software</dc:type>
</oai_dc:dc>
74
46
views
downloads
All versions This version
Views 749
Downloads 465
Data volume 238.3 MB25.2 MB
Unique views 549
Unique downloads 203

Share

Cite as