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


MARC21 XML Export

<?xml version='1.0' encoding='UTF-8'?>
<record xmlns="http://www.loc.gov/MARC21/slim">
  <leader>00000nmm##2200000uu#4500</leader>
  <controlfield tag="005">20190314171156.0</controlfield>
  <controlfield tag="001">2584018</controlfield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Imperial College London</subfield>
    <subfield code="a">Zhian N. Kamvar</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Tsinghua University</subfield>
    <subfield code="a">Jun Cai</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Stellenbosch University</subfield>
    <subfield code="a">Juliet Pulliam</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Public Health England</subfield>
    <subfield code="a">Sarah Chisholm</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="a">Rich FitzJohn</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="a">Jakob Schumacher</subfield>
  </datafield>
  <datafield tag="700" ind1=" " ind2=" ">
    <subfield code="u">Imperial College London</subfield>
    <subfield code="a">Sangeeta Bhatia</subfield>
  </datafield>
  <datafield tag="856" ind1="4" ind2=" ">
    <subfield code="s">5047972</subfield>
    <subfield code="z">md5:cd17dfc72651faf441164b471fcf6256</subfield>
    <subfield code="u">https://zenodo.org/record/2584018/files/reconhub/incidence-1.6.0.zip</subfield>
  </datafield>
  <datafield tag="542" ind1=" " ind2=" ">
    <subfield code="l">open</subfield>
  </datafield>
  <datafield tag="260" ind1=" " ind2=" ">
    <subfield code="c">2019-03-05</subfield>
  </datafield>
  <datafield tag="909" ind1="C" ind2="O">
    <subfield code="p">software</subfield>
    <subfield code="o">oai:zenodo.org:2584018</subfield>
  </datafield>
  <datafield tag="100" ind1=" " ind2=" ">
    <subfield code="u">Imperial College London</subfield>
    <subfield code="a">Thibaut Jombart</subfield>
  </datafield>
  <datafield tag="245" ind1=" " ind2=" ">
    <subfield code="a">reconhub/incidence: Incidence version 1.6.0</subfield>
  </datafield>
  <datafield tag="540" ind1=" " ind2=" ">
    <subfield code="a">Other (Open)</subfield>
  </datafield>
  <datafield tag="650" ind1="1" ind2="7">
    <subfield code="a">cc-by</subfield>
    <subfield code="2">opendefinition.org</subfield>
  </datafield>
  <datafield tag="520" ind1=" " ind2=" ">
    <subfield code="a">&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;</subfield>
  </datafield>
  <datafield tag="773" ind1=" " ind2=" ">
    <subfield code="n">url</subfield>
    <subfield code="i">isSupplementTo</subfield>
    <subfield code="a">https://github.com/reconhub/incidence/tree/1.6.0</subfield>
  </datafield>
  <datafield tag="773" ind1=" " ind2=" ">
    <subfield code="n">doi</subfield>
    <subfield code="i">isVersionOf</subfield>
    <subfield code="a">10.5281/zenodo.1404718</subfield>
  </datafield>
  <datafield tag="024" ind1=" " ind2=" ">
    <subfield code="a">10.5281/zenodo.2584018</subfield>
    <subfield code="2">doi</subfield>
  </datafield>
  <datafield tag="980" ind1=" " ind2=" ">
    <subfield code="a">software</subfield>
  </datafield>
</record>
68
46
views
downloads
All versions This version
Views 688
Downloads 465
Data volume 238.3 MB25.2 MB
Unique views 498
Unique downloads 203

Share

Cite as