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


DataCite XML Export

<?xml version='1.0' encoding='utf-8'?>
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://datacite.org/schema/kernel-4" xsi:schemaLocation="http://datacite.org/schema/kernel-4 http://schema.datacite.org/meta/kernel-4.1/metadata.xsd">
  <identifier identifierType="DOI">10.5281/zenodo.2584018</identifier>
  <creators>
    <creator>
      <creatorName>Thibaut Jombart</creatorName>
      <affiliation>Imperial College London</affiliation>
    </creator>
    <creator>
      <creatorName>Zhian N. Kamvar</creatorName>
      <affiliation>Imperial College London</affiliation>
    </creator>
    <creator>
      <creatorName>Jun Cai</creatorName>
      <affiliation>Tsinghua University</affiliation>
    </creator>
    <creator>
      <creatorName>Juliet Pulliam</creatorName>
      <affiliation>Stellenbosch University</affiliation>
    </creator>
    <creator>
      <creatorName>Sarah Chisholm</creatorName>
      <affiliation>Public Health England</affiliation>
    </creator>
    <creator>
      <creatorName>Rich FitzJohn</creatorName>
      <affiliation></affiliation>
    </creator>
    <creator>
      <creatorName>Jakob Schumacher</creatorName>
      <affiliation></affiliation>
    </creator>
    <creator>
      <creatorName>Sangeeta Bhatia</creatorName>
      <affiliation>Imperial College London</affiliation>
    </creator>
  </creators>
  <titles>
    <title>reconhub/incidence: Incidence version 1.6.0</title>
  </titles>
  <publisher>Zenodo</publisher>
  <publicationYear>2019</publicationYear>
  <dates>
    <date dateType="Issued">2019-03-05</date>
  </dates>
  <resourceType resourceTypeGeneral="Software"/>
  <alternateIdentifiers>
    <alternateIdentifier alternateIdentifierType="url">https://zenodo.org/record/2584018</alternateIdentifier>
  </alternateIdentifiers>
  <relatedIdentifiers>
    <relatedIdentifier relatedIdentifierType="URL" relationType="IsSupplementTo">https://github.com/reconhub/incidence/tree/1.6.0</relatedIdentifier>
    <relatedIdentifier relatedIdentifierType="DOI" relationType="IsVersionOf">10.5281/zenodo.1404718</relatedIdentifier>
  </relatedIdentifiers>
  <version>1.6.0</version>
  <rightsList>
    <rights rightsURI="info:eu-repo/semantics/openAccess">Open Access</rights>
  </rightsList>
  <descriptions>
    <description descriptionType="Abstract">&lt;p&gt;The changes in this version are small, but the impact changes the behavior, so the minor version number is bumped. This updates &lt;code&gt;first_date&lt;/code&gt; to NOT override &lt;code&gt;standard = TRUE&lt;/code&gt;. This changes behavior because &lt;code&gt;first_date&lt;/code&gt; used to automatically set &lt;code&gt;standard = FALSE&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The change to having &lt;code&gt;standard&lt;/code&gt; supersede &lt;code&gt;first_date&lt;/code&gt; 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.&lt;/p&gt;
&lt;p&gt;To alert users to the change while minimizing annoyance, a one-time warning is now issued if &lt;code&gt;standard&lt;/code&gt; is not specified with &lt;code&gt;first_date&lt;/code&gt;. This can be explicitly turned off by setting an the &lt;code&gt;incidence.warn.first_date&lt;/code&gt; option to &lt;code&gt;FALSE&lt;/code&gt; (as described in the warning):&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-r"&gt;library(&amp;quot;incidence&amp;quot;)
d &amp;lt;- Sys.Date() + sample(-3:10, 10, replace = TRUE)
Sys.Date() - 10
#&amp;gt; [1] &amp;quot;2019-02-23&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If both &lt;code&gt;standard&lt;/code&gt; and &lt;code&gt;first_date&lt;/code&gt;specified, no warning&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-r"&gt;incidence(d, interval = &amp;quot;week&amp;quot;, first_date = Sys.Date() - 10, standard = TRUE)
#&amp;gt; &amp;lt;incidence object&amp;gt;
#&amp;gt; [10 cases from days 2019-02-18 to 2019-03-11]
#&amp;gt; [10 cases from ISO weeks 2019-W08 to 2019-W11]
#&amp;gt; 
#&amp;gt; $counts: matrix with 4 rows and 1 columns
#&amp;gt; $n: 10 cases in total
#&amp;gt; $dates: 4 dates marking the left-side of bins
#&amp;gt; $interval: 1 week
#&amp;gt; $timespan: 22 days
#&amp;gt; $cumulative: FALSE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;warning issued if &lt;code&gt;standard&lt;/code&gt; not specified&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-r"&gt;incidence(d, interval = &amp;quot;week&amp;quot;, first_date = Sys.Date() - 10)
#&amp;gt; Warning in incidence.Date(d, interval = &amp;quot;week&amp;quot;, first_date = Sys.Date() - : 
#&amp;gt; 
#&amp;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`.
#&amp;gt; 
#&amp;gt; To remove this warning in the future,  explicitly set the `standard` argument OR use `options(incidence.warn.first_date = FALSE)`
#&amp;gt; &amp;lt;incidence object&amp;gt;
#&amp;gt; [10 cases from days 2019-02-18 to 2019-03-11]
#&amp;gt; [10 cases from ISO weeks 2019-W08 to 2019-W11]
#&amp;gt; 
#&amp;gt; $counts: matrix with 4 rows and 1 columns
#&amp;gt; $n: 10 cases in total
#&amp;gt; $dates: 4 dates marking the left-side of bins
#&amp;gt; $interval: 1 week
#&amp;gt; $timespan: 22 days
#&amp;gt; $cumulative: FALSE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;no warning issued the second time around.&lt;/p&gt;
&lt;pre&gt;&lt;code class="lang-r"&gt;incidence(d, interval = &amp;quot;week&amp;quot;, first_date = Sys.Date() - 10)
#&amp;gt; &amp;lt;incidence object&amp;gt;
#&amp;gt; [10 cases from days 2019-02-18 to 2019-03-11]
#&amp;gt; [10 cases from ISO weeks 2019-W08 to 2019-W11]
#&amp;gt; 
#&amp;gt; $counts: matrix with 4 rows and 1 columns
#&amp;gt; $n: 10 cases in total
#&amp;gt; $dates: 4 dates marking the left-side of bins
#&amp;gt; $interval: 1 week
#&amp;gt; $timespan: 22 days
#&amp;gt; $cumulative: FALSE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;lt;sup&amp;gt;Created on 2019-03-05 by the [reprex package](https://reprex.tidyverse.org) (v0.2.1)&amp;lt;/sup&amp;gt;&lt;/p&gt;
&lt;p&gt;Full changes detailed below:&lt;/p&gt;

BEHAVIORAL CHANGE
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;incidence()&lt;/code&gt; will no longer allow a non-standard &lt;code&gt;first_date&lt;/code&gt; to override
&lt;code&gt;standard = TRUE&lt;/code&gt;. The first call to &lt;code&gt;incidence()&lt;/code&gt; specifying &lt;code&gt;first_date&lt;/code&gt; 
without &lt;code&gt;standard&lt;/code&gt; will issue a warning. To use non-standard first dates, 
specify &lt;code&gt;standard = FALSE&lt;/code&gt;. To remove the warning, use
&lt;code&gt;options(incidence.warn.first_date = FALSE)&lt;/code&gt;. See
&lt;a href="https://github.com/reconhub/incidence/issues/87"&gt;https://github.com/reconhub/incidence/issues/87&lt;/a&gt; for details.  &lt;/li&gt;
&lt;/ul&gt;
MISC
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;citation("incidence")&lt;/code&gt; will now give the proper citation for our article in
F1000 research and the global DOI for archived code. See
&lt;a href="https://github.com/reconhub/incidence/pulls/106"&gt;https://github.com/reconhub/incidence/pulls/106&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Tests have been updated to avoid randomisation errors on R 3.6.0
See &lt;a href="https://github.com/reconhub/incidence/issues/107"&gt;https://github.com/reconhub/incidence/issues/107&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
  </descriptions>
</resource>
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