New Upstream Snapshot - r-cran-warp

Ready changes

Summary

Merged new upstream version: 0.2.0+git20201021.1.765ea3c (was: 0.2.0).

Resulting package

Built on 2023-01-20T00:21 (took 9m11s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots r-cran-warp-dbgsymapt install -t fresh-snapshots r-cran-warp

Diff

diff --git a/DESCRIPTION b/DESCRIPTION
index fc90f7e..92780bd 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: warp
 Title: Group Dates
-Version: 0.2.0
+Version: 0.2.0.9000
 Authors@R: 
     c(person(given = "Davis",
              family = "Vaughan",
@@ -20,13 +20,11 @@ BugReports: https://github.com/DavisVaughan/warp/issues
 Depends: R (>= 3.2)
 Suggests: covr, testthat (>= 2.1.0), knitr, rmarkdown
 Encoding: UTF-8
-LazyData: true
+Roxygen: list(markdown = TRUE)
 RoxygenNote: 7.1.1
 VignetteBuilder: knitr
 NeedsCompilation: yes
-Packaged: 2020-10-21 17:22:54 UTC; davis
+Packaged: 2023-01-20 00:17:04 UTC; root
 Author: Davis Vaughan [aut, cre],
   RStudio [cph]
 Maintainer: Davis Vaughan <davis@rstudio.com>
-Repository: CRAN
-Date/Publication: 2020-10-21 18:00:02 UTC
diff --git a/MD5 b/MD5
deleted file mode 100644
index bd40794..0000000
--- a/MD5
+++ /dev/null
@@ -1,44 +0,0 @@
-eae33e9e3a5f101f3d06d156fd82ef94 *DESCRIPTION
-558c5e7265510691231601da3cb3f12b *LICENSE
-73ac4c15c755b9d1555082ad53ab0909 *NAMESPACE
-8158a8d169769f49b11304981563968c *NEWS.md
-98a0693e714c4f48691276c1855aa047 *R/boundary.R
-71ac4f25b6b2e5202c1fded5100b41a7 *R/change.R
-c180a345346dde264015c70ceb360332 *R/date.R
-231fedf5cb3ed7abe7396119ca82d385 *R/distance.R
-a5f64f23c3a85bacb76d6db2c87a41c0 *R/divmod.R
-c45f86895c5e3c6d30615b3cbb336542 *R/dots.R
-6c1f2e82813521343e9b612e03508b38 *R/utils.R
-6fb450352e850f2c3e852f9a648f1822 *R/warp-package.R
-56a10dc9178533f454b88bfa09ae7b08 *R/zzz.R
-3352c63737311d4651dc6b85081cd78b *README.md
-083417f806430c97ad19eecc89ca56c2 *build/vignette.rds
-2e85aa5cd94bbfef0349fb98ed0fcb36 *inst/doc/hour.R
-c7c9b2ae8a33a1c3ec75c9b5474b182f *inst/doc/hour.Rmd
-e1aba73ed980a08e7244890844e0be9c *inst/doc/hour.html
-95586c24fdde4b93f39a88a0e91d9610 *man/warp-package.Rd
-a76227450e49a07e88add3872142e641 *man/warp_boundary.Rd
-2e79fcafbc52763a1eef036ec66d6535 *man/warp_change.Rd
-70cbd074e72a992f2c84dc7930d10016 *man/warp_distance.Rd
-c275773b9432b4de22f0c27b8bd9a6c1 *src/boundary.c
-5a4a9745c645bc784709f65da8a909d3 *src/change.c
-9ae7932a496bb4c9ead4c022b35649b6 *src/coercion.c
-bf3f1e90ce49b0e94c8d91220763d47a *src/date.c
-7f49dec486aa3795f7cdbd00062620ec *src/distance.c
-890e8dfad34523d91136cc58514d5a18 *src/divmod.c
-17cd78c1506905c631498943a6edb2bc *src/divmod.h
-6da4f05e7a99b107c85dd26f7d5b94b9 *src/get.c
-1529c64fba5f5a1ea1ab72576d42bf34 *src/init.c
-a0e21a5aaf3c65a0df1a3658760a76f6 *src/timezone.c
-a963034bd2a58f47f94ce18042713845 *src/utils.c
-aee5c44f1d526e7f2f5d787686dba7d7 *src/utils.h
-bf902709130f2238ee9d8970a2264312 *src/warp.h
-21269f367ce9dd3f5db76f6206083547 *tests/testthat.R
-0d8d282bc2f54ffe60f0ac9616f61423 *tests/testthat/helper-constructor.R
-5d3c9b6af4863600da9578b46623bff9 *tests/testthat/helper-with-option.R
-d5bafbda8080467cb3692b90b4e40595 *tests/testthat/test-boundaries.R
-e09f0c6d5d1128e65862b38abfeca736 *tests/testthat/test-change.R
-2cfb514bcff2ed17be53c287ea6e971a *tests/testthat/test-date.R
-cdf69ecccbda157fb39b24d0a77014c4 *tests/testthat/test-distance.R
-be545e0755739075cb8b06b4c232c13f *tests/testthat/test-divmod.R
-c7c9b2ae8a33a1c3ec75c9b5474b182f *vignettes/hour.Rmd
diff --git a/NEWS.md b/NEWS.md
index 66ab98f..cab7462 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,5 @@
+# warp (development version)
+
 # warp 0.2.0
 
 * All optional arguments must now be specified by name.
diff --git a/build/vignette.rds b/build/vignette.rds
index f5fb8d9..e05b4ee 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/debian/changelog b/debian/changelog
index 0414248..9658b31 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+r-cran-warp (0.2.0+git20201021.1.765ea3c-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Fri, 20 Jan 2023 00:17:14 -0000
+
 r-cran-warp (0.2.0-2) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/fix-32-bit.patch b/debian/patches/fix-32-bit.patch
index 69d3039..242d957 100644
--- a/debian/patches/fix-32-bit.patch
+++ b/debian/patches/fix-32-bit.patch
@@ -2,15 +2,17 @@ Description: Cast/hack around tests to get it passing also on 32 bit
 Author: Nilesh Patra <nilesh@debian.org>
 Forwarded: no
 Last-Update: 2022-08-20
---- a/tests/testthat/test-date.R
-+++ b/tests/testthat/test-date.R
+Index: r-cran-warp.git/tests/testthat/test-date.R
+===================================================================
+--- r-cran-warp.git.orig/tests/testthat/test-date.R
++++ r-cran-warp.git/tests/testthat/test-date.R
 @@ -1,3 +1,5 @@
 +library(testthat)
 +library(warp)
  # as.POSIXlt.Date() is unbearably slow, this is much faster
  as_posixlt_from_date <- function(x) {
    origin <- structure(0, class = "Date")
-@@ -50,10 +52,10 @@
+@@ -50,10 +52,10 @@ test_that("getting the year month is ide
  })
  
  test_that("can get the year offset of the maximum integer value", {
diff --git a/inst/doc/hour.html b/inst/doc/hour.html
index f2f27b2..171a41b 100644
--- a/inst/doc/hour.html
+++ b/inst/doc/hour.html
@@ -27,40 +27,6 @@ document.addEventListener('DOMContentLoaded', function(e) {
   }
 });
 </script>
-<style type="text/css">
-a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;}
-a.anchor-section::before {content: '#';}
-.hasAnchor:hover a.anchor-section {visibility: visible;}
-</style>
-<script>// Anchor sections v1.0 written by Atsushi Yasumoto on Oct 3rd, 2020.
-document.addEventListener('DOMContentLoaded', function() {
-  const h = document.querySelectorAll('h1, h2, h3, h4, h5, h6');
-
-  // Do nothing if sections are already anchored
-  if (Array.from(h).some(x => x.classList.contains('hasAnchor'))) {
-    return null;
-  }
-
-  // Use section id when pandoc runs with --section-divs
-  const section_id = function(x) {
-    return ((x.classList.contains('section') || (x.tagName === 'SECTION'))
-            ? x.id : '');
-  };
-
-  // Add anchors
-  h.forEach(function(x) {
-    const id = x.id || section_id(x.parentElement);
-    if (id === '') {
-      return null;
-    }
-    let anchor = document.createElement('a');
-    anchor.href = '#' + id;
-    anchor.classList = ['anchor-section'];
-    x.classList.add('hasAnchor');
-    x.appendChild(anchor);
-  });
-});
-</script>
 
 <style type="text/css">
   code{white-space: pre-wrap;}
@@ -72,11 +38,20 @@ document.addEventListener('DOMContentLoaded', function() {
     </style>
 
 
-<style type="text/css">code{white-space: pre;}</style>
+
+<style type="text/css">
+  code {
+    white-space: pre;
+  }
+  .sourceCode {
+    overflow: visible;
+  }
+</style>
 <style type="text/css" data-origin="pandoc">
 pre > code.sourceCode { white-space: pre; position: relative; }
 pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
 pre > code.sourceCode > span:empty { height: 1.2em; }
+.sourceCode { overflow: visible; }
 code.sourceCode > span { color: inherit; text-decoration: inherit; }
 div.sourceCode { margin: 1em 0; }
 pre.sourceCode { margin: 0; }
@@ -111,7 +86,7 @@ code span.al { color: #ff0000; font-weight: bold; } /* Alert */
 code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
 code span.at { color: #7d9029; } /* Attribute */
 code span.bn { color: #40a070; } /* BaseN */
-code span.bu { } /* BuiltIn */
+code span.bu { color: #008000; } /* BuiltIn */
 code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
 code span.ch { color: #4070a0; } /* Char */
 code span.cn { color: #880000; } /* Constant */
@@ -124,7 +99,7 @@ code span.er { color: #ff0000; font-weight: bold; } /* Error */
 code span.ex { } /* Extension */
 code span.fl { color: #40a070; } /* Float */
 code span.fu { color: #06287e; } /* Function */
-code span.im { } /* Import */
+code span.im { color: #008000; font-weight: bold; } /* Import */
 code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
 code span.kw { color: #007020; font-weight: bold; } /* Keyword */
 code span.op { color: #666666; } /* Operator */
@@ -145,13 +120,20 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
   for (var i = 0; i < sheets.length; i++) {
     if (sheets[i].ownerNode.dataset["origin"] !== "pandoc") continue;
     try { var rules = sheets[i].cssRules; } catch (e) { continue; }
-    for (var j = 0; j < rules.length; j++) {
+    var j = 0;
+    while (j < rules.length) {
       var rule = rules[j];
       // check if there is a div.sourceCode rule
-      if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") continue;
+      if (rule.type !== rule.STYLE_RULE || rule.selectorText !== "div.sourceCode") {
+        j++;
+        continue;
+      }
       var style = rule.style.cssText;
       // check if color or background-color is set
-      if (rule.style.color === '' && rule.style.backgroundColor === '') continue;
+      if (rule.style.color === '' && rule.style.backgroundColor === '') {
+        j++;
+        continue;
+      }
       // replace div.sourceCode by a pre.sourceCode rule
       sheets[i].deleteRule(j);
       sheets[i].insertRule('pre.sourceCode{' + style + '}', j);
@@ -162,6 +144,7 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
 
 
 
+
 <style type="text/css">body {
 background-color: #fff;
 margin: 1em auto;
@@ -359,17 +342,26 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }
 
 
 <div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="fu">library</span>(warp)</span></code></pre></div>
-<p>If using <code>period = &quot;hour&quot;</code>, it should work as expected at all times when using a time zone that doesn’t have daylight savings, like UTC or EST. If using a time zone with DST, like America/New_York, some additional explanation is required, especially when <code>every &gt; 1</code>.</p>
+<p>If using <code>period = &quot;hour&quot;</code>, it should work as expected at
+all times when using a time zone that doesn’t have daylight savings,
+like UTC or EST. If using a time zone with DST, like America/New_York,
+some additional explanation is required, especially when
+<code>every &gt; 1</code>.</p>
 <div id="spring-forward-gap" class="section level2">
 <h2>Spring Forward Gap</h2>
-<p>In America/New_York’s time zone, as time was about to reach <code>1970-04-26 02:00:00</code>, daylight savings kicked in and time shifts forward 1 hour so that the next time is actually <code>1970-04-26 03:00:00</code>.</p>
+<p>In America/New_York’s time zone, as time was about to reach
+<code>1970-04-26 02:00:00</code>, daylight savings kicked in and time
+shifts forward 1 hour so that the next time is actually
+<code>1970-04-26 03:00:00</code>.</p>
 <div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a>before_dst <span class="ot">&lt;-</span> <span class="fu">as.POSIXct</span>(<span class="st">&quot;1970-04-26 01:59:59&quot;</span>, <span class="at">tz =</span> <span class="st">&quot;America/New_York&quot;</span>)</span>
 <span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a>before_dst</span>
 <span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;1970-04-26 01:59:59 EST&quot;</span></span>
 <span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a></span>
 <span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a>before_dst <span class="sc">+</span> <span class="dv">1</span></span>
 <span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;1970-04-26 03:00:00 EDT&quot;</span></span></code></pre></div>
-<p><code>warp_distance()</code> treats hours 1 and 3 as being side by side, since no hour 2 ever existed. This means that hours (0, 1) and (3, 4) get grouped together in the below example.</p>
+<p><code>warp_distance()</code> treats hours 1 and 3 as being side by
+side, since no hour 2 ever existed. This means that hours (0, 1) and (3,
+4) get grouped together in the below example.</p>
 <div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="fu">as.POSIXct</span>(<span class="st">&quot;1970-04-26 00:00:00&quot;</span>, <span class="at">tz =</span> <span class="st">&quot;America/New_York&quot;</span>) <span class="sc">+</span> <span class="dv">3600</span> <span class="sc">*</span> <span class="dv">0</span><span class="sc">:</span><span class="dv">7</span></span>
 <span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a></span>
 <span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="fu">data.frame</span>(</span>
@@ -385,7 +377,11 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }
 <span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 6 1970-04-26 06:00:00 1382</span></span>
 <span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 7 1970-04-26 07:00:00 1383</span></span>
 <span id="cb3-15"><a href="#cb3-15" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 8 1970-04-26 08:00:00 1383</span></span></code></pre></div>
-<p>Because <code>period = &quot;hour&quot;</code> just computes the running number of 2 hour periods from the <code>origin</code>, this pattern carries forward into the next day to have a contiguous stream of values. This can be somewhat confusing, since hours 0 and 1 don’t get grouped together on the 27th.</p>
+<p>Because <code>period = &quot;hour&quot;</code> just computes the running number
+of 2 hour periods from the <code>origin</code>, this pattern carries
+forward into the next day to have a contiguous stream of values. This
+can be somewhat confusing, since hours 0 and 1 don’t get grouped
+together on the 27th.</p>
 <div class="sourceCode" id="cb4"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>y <span class="ot">&lt;-</span> <span class="fu">as.POSIXct</span>(<span class="st">&quot;1970-04-26 22:00:00&quot;</span>, <span class="at">tz =</span> <span class="st">&quot;America/New_York&quot;</span>) <span class="sc">+</span> <span class="dv">3600</span> <span class="sc">*</span> <span class="dv">0</span><span class="sc">:</span><span class="dv">5</span></span>
 <span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span>
 <span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="fu">data.frame</span>(</span>
@@ -399,7 +395,10 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }
 <span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 4 1970-04-27 01:00:00 1392</span></span>
 <span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 5 1970-04-27 02:00:00 1392</span></span>
 <span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 6 1970-04-27 03:00:00 1393</span></span></code></pre></div>
-<p>One way that you can sort of get around this is by using lubridate’s <code>force_tz()</code> function to force a UTC time zone with the same clock time as your original date. I’ve mocked up a poor man’s version of that function below.</p>
+<p>One way that you can sort of get around this is by using lubridate’s
+<code>force_tz()</code> function to force a UTC time zone with the same
+clock time as your original date. I’ve mocked up a poor man’s version of
+that function below.</p>
 <div class="sourceCode" id="cb5"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="co"># Or call `lubridate::force_tz(x, &quot;UTC&quot;)`</span></span>
 <span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a>force_utc <span class="ot">&lt;-</span> <span class="cf">function</span>(x) {</span>
 <span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a>  x_lt <span class="ot">&lt;-</span> <span class="fu">as.POSIXlt</span>(x)</span>
@@ -420,7 +419,10 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }
 <span id="cb5-18"><a href="#cb5-18" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [3] &quot;1970-04-26 03:00:00 UTC&quot; &quot;1970-04-26 04:00:00 UTC&quot;</span></span>
 <span id="cb5-19"><a href="#cb5-19" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [5] &quot;1970-04-26 05:00:00 UTC&quot; &quot;1970-04-26 06:00:00 UTC&quot;</span></span>
 <span id="cb5-20"><a href="#cb5-20" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [7] &quot;1970-04-26 07:00:00 UTC&quot; &quot;1970-04-26 08:00:00 UTC&quot;</span></span></code></pre></div>
-<p>In UTC, hour 2 exists so groups are created as (0, 1), (2, 3), and so on, even though hour 2 doesn’t actually exist in America/New_York because of the DST gap. This has the affect of limiting the (2, 3) group to a maximum size of 1, since only hour 3 is possible in the data.</p>
+<p>In UTC, hour 2 exists so groups are created as (0, 1), (2, 3), and so
+on, even though hour 2 doesn’t actually exist in America/New_York
+because of the DST gap. This has the affect of limiting the (2, 3) group
+to a maximum size of 1, since only hour 3 is possible in the data.</p>
 <div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">data.frame</span>(</span>
 <span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a>  <span class="at">x_utc =</span> x_utc,</span>
 <span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">hour =</span> <span class="fu">warp_distance</span>(x_utc, <span class="st">&quot;hour&quot;</span>, <span class="at">every =</span> <span class="dv">2</span>)</span>
@@ -449,7 +451,11 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }
 </div>
 <div id="fall-backwards-overlap" class="section level2">
 <h2>Fall Backwards Overlap</h2>
-<p>In America/New_York’s time zone, as time was about to reach <code>1970-10-25 02:00:00</code>, daylight savings kicked in and time shifts backwards 1 hour so that the next time is actually <code>1970-10-25 01:00:00</code>. This means there are 2 full hours with an hour value of 1 in that day.</p>
+<p>In America/New_York’s time zone, as time was about to reach
+<code>1970-10-25 02:00:00</code>, daylight savings kicked in and time
+shifts backwards 1 hour so that the next time is actually
+<code>1970-10-25 01:00:00</code>. This means there are 2 full hours with
+an hour value of 1 in that day.</p>
 <div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a>before_fallback <span class="ot">&lt;-</span> <span class="fu">as.POSIXct</span>(<span class="st">&quot;1970-10-25 01:00:00&quot;</span>, <span class="at">tz =</span> <span class="st">&quot;America/New_York&quot;</span>)</span>
 <span id="cb7-2"><a href="#cb7-2" aria-hidden="true" tabindex="-1"></a>before_fallback</span>
 <span id="cb7-3"><a href="#cb7-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;1970-10-25 01:00:00 EDT&quot;</span></span>
@@ -457,7 +463,11 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }
 <span id="cb7-5"><a href="#cb7-5" aria-hidden="true" tabindex="-1"></a><span class="co"># add 1 hour of seconds</span></span>
 <span id="cb7-6"><a href="#cb7-6" aria-hidden="true" tabindex="-1"></a>before_fallback <span class="sc">+</span> <span class="dv">3600</span></span>
 <span id="cb7-7"><a href="#cb7-7" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;1970-10-25 01:00:00 EST&quot;</span></span></code></pre></div>
-<p>Because these are two distinct hours, <code>warp_distance()</code> treats them as such, so in the example below a group of (1 EDT, 1 EST) gets created. Since daylight savings is currently active, we also have the situation described above where hour 0 and hour 1 are not grouped together.</p>
+<p>Because these are two distinct hours, <code>warp_distance()</code>
+treats them as such, so in the example below a group of (1 EDT, 1 EST)
+gets created. Since daylight savings is currently active, we also have
+the situation described above where hour 0 and hour 1 are not grouped
+together.</p>
 <div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a>x <span class="ot">&lt;-</span> <span class="fu">as.POSIXct</span>(<span class="st">&quot;1970-10-25 00:00:00&quot;</span>, <span class="at">tz =</span> <span class="st">&quot;America/New_York&quot;</span>) <span class="sc">+</span> <span class="dv">3600</span> <span class="sc">*</span> <span class="dv">0</span><span class="sc">:</span><span class="dv">7</span></span>
 <span id="cb8-2"><a href="#cb8-2" aria-hidden="true" tabindex="-1"></a>x</span>
 <span id="cb8-3"><a href="#cb8-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;1970-10-25 00:00:00 EDT&quot; &quot;1970-10-25 01:00:00 EDT&quot;</span></span>
@@ -478,7 +488,8 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }
 <span id="cb8-18"><a href="#cb8-18" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 6 1970-10-25 04:00:00 3566</span></span>
 <span id="cb8-19"><a href="#cb8-19" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 7 1970-10-25 05:00:00 3566</span></span>
 <span id="cb8-20"><a href="#cb8-20" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 8 1970-10-25 06:00:00 3567</span></span></code></pre></div>
-<p>This fallback adjustment actually realigns hours 0 and 1 in the next day, since the 25th has 25 hours.</p>
+<p>This fallback adjustment actually realigns hours 0 and 1 in the next
+day, since the 25th has 25 hours.</p>
 <div class="sourceCode" id="cb9"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true" tabindex="-1"></a>y <span class="ot">&lt;-</span> <span class="fu">as.POSIXct</span>(<span class="st">&quot;1970-10-25 22:00:00&quot;</span>, <span class="at">tz =</span> <span class="st">&quot;America/New_York&quot;</span>) <span class="sc">+</span> <span class="dv">3600</span> <span class="sc">*</span> <span class="dv">0</span><span class="sc">:</span><span class="dv">5</span></span>
 <span id="cb9-2"><a href="#cb9-2" aria-hidden="true" tabindex="-1"></a>y</span>
 <span id="cb9-3"><a href="#cb9-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;1970-10-25 22:00:00 EST&quot; &quot;1970-10-25 23:00:00 EST&quot;</span></span>
@@ -496,14 +507,19 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }
 <span id="cb9-15"><a href="#cb9-15" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 4 1970-10-26 01:00:00 3576</span></span>
 <span id="cb9-16"><a href="#cb9-16" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 5 1970-10-26 02:00:00 3577</span></span>
 <span id="cb9-17"><a href="#cb9-17" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; 6 1970-10-26 03:00:00 3577</span></span></code></pre></div>
-<p>As before, one way to sort of avoid this is to force a UTC time zone.</p>
+<p>As before, one way to sort of avoid this is to force a UTC time
+zone.</p>
 <div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a>x_utc <span class="ot">&lt;-</span> <span class="fu">force_utc</span>(x)</span>
 <span id="cb10-2"><a href="#cb10-2" aria-hidden="true" tabindex="-1"></a>x_utc</span>
 <span id="cb10-3"><a href="#cb10-3" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [1] &quot;1970-10-25 00:00:00 UTC&quot; &quot;1970-10-25 01:00:00 UTC&quot;</span></span>
 <span id="cb10-4"><a href="#cb10-4" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [3] &quot;1970-10-25 01:00:00 UTC&quot; &quot;1970-10-25 02:00:00 UTC&quot;</span></span>
 <span id="cb10-5"><a href="#cb10-5" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [5] &quot;1970-10-25 03:00:00 UTC&quot; &quot;1970-10-25 04:00:00 UTC&quot;</span></span>
 <span id="cb10-6"><a href="#cb10-6" aria-hidden="true" tabindex="-1"></a><span class="co">#&gt; [7] &quot;1970-10-25 05:00:00 UTC&quot; &quot;1970-10-25 06:00:00 UTC&quot;</span></span></code></pre></div>
-<p>The consequences of this are that you have two dates with an hour value of 1. When forced to UTC, these look identical. The groups are as you probably expect with buckets of hours (0, 1), (2, 3), and so on, but now the two dates with hour values of 1 are identical so they fall in the same hour group.</p>
+<p>The consequences of this are that you have two dates with an hour
+value of 1. When forced to UTC, these look identical. The groups are as
+you probably expect with buckets of hours (0, 1), (2, 3), and so on, but
+now the two dates with hour values of 1 are identical so they fall in
+the same hour group.</p>
 <div class="sourceCode" id="cb11"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">data.frame</span>(</span>
 <span id="cb11-2"><a href="#cb11-2" aria-hidden="true" tabindex="-1"></a>  <span class="at">x_utc =</span> x_utc,</span>
 <span id="cb11-3"><a href="#cb11-3" aria-hidden="true" tabindex="-1"></a>  <span class="at">hour =</span> <span class="fu">warp_distance</span>(x_utc, <span class="st">&quot;hour&quot;</span>, <span class="at">every =</span> <span class="dv">2</span>)</span>
@@ -520,7 +536,14 @@ code > span.er { color: #a61717; background-color: #e3d2d2; }
 </div>
 <div id="conclusion" class="section level2">
 <h2>Conclusion</h2>
-<p>While the implementation of <code>period = &quot;hour&quot;</code> is <em>technically</em> correct, I recognize that it isn’t the most intuitive operation. More intuitive would be a period value of <code>&quot;dhour&quot;</code>, which would correspond to the “hour of the day”. This would count the number of hour groups from the origin, like <code>&quot;hour&quot;</code> does, but it would reset the <code>every</code>-hour counter every time you enter a new day. However, this has proved to be challenging to code up, but I hope to incorporate this eventually.</p>
+<p>While the implementation of <code>period = &quot;hour&quot;</code> is
+<em>technically</em> correct, I recognize that it isn’t the most
+intuitive operation. More intuitive would be a period value of
+<code>&quot;dhour&quot;</code>, which would correspond to the “hour of the day”.
+This would count the number of hour groups from the origin, like
+<code>&quot;hour&quot;</code> does, but it would reset the <code>every</code>-hour
+counter every time you enter a new day. However, this has proved to be
+challenging to code up, but I hope to incorporate this eventually.</p>
 </div>
 
 

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/debug/.build-id/f5/73a992dd9029bb49d09e55d1e78ced455bef09.debug

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/lib/debug/.build-id/95/f8036ac5df969b4338c98be6c558a9ad9d621a.debug

Control files of package r-cran-warp: lines which differ (wdiff format)

  • Depends: r-base-core (>= 4.1.3.20220413-2~jan+lint1), 4.2.0-1~jan+unchanged1), r-api-4.0, libc6 (>= 2.4)

Control files of package r-cran-warp-dbgsym: lines which differ (wdiff format)

  • Build-Ids: 95f8036ac5df969b4338c98be6c558a9ad9d621a f573a992dd9029bb49d09e55d1e78ced455bef09

More details

Full run details