<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/anytime-0-3-0/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://dirk.eddelbuettel.com/blog/2017/06/05#anytime_0.3.0"> Thinking inside the box </a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>A new version of the <a rel="nofollow" href="http://dirk.eddelbuettel.com/code/anytime.html" target="_blank">anytime</a> package is now on <a rel="nofollow" href="https://cran.r-project.org/" target="_blank">CRAN</a>. It marks the eleventh release since the inaugural version late last summer.</p>
<p><a rel="nofollow" href="http://dirk.eddelbuettel.com/code/anytime.html" target="_blank">anytime</a> is a very focused package aiming to do just one thing <em>really</em> well: to convert <em>anything</em> in integer, numeric, character, factor, ordered, … format to either POSIXct or Date objects — and to do so <em>without requiring a format string</em>. See the <a rel="nofollow" href="http://dirk.eddelbuettel.com/code/anytime.html" target="_blank">anytime</a> page, or the <a rel="nofollow" href="https://github.com/eddelbuettel/anytime" target="_blank">GitHub README.md</a> for a few examples.</p>
<p>This release brings a little more consistency to how <em>numeric</em> or <em>integer</em> arguments are handled. Previously, we were overly eager in accepting something such as 20150605 (<em>i.e.</em> today) as a (numerical or integer) input to both <code>anytime()</code> and <code>anydate()</code>. That is well-intentioned, but ultimately foolish. We relied on heuristic cutoffs to determine whether input was &quot;meant to be&quot; a date or time offset. There lies madness. We now differentiate whether we were called via <code>anytime()</code> (in which case numerical data is second offset to the epoch, just <code>as.POSICct()</code>) or <code>anytime()</code> (in which case it is days offset to the (date) epoch, just like <code>as.Date()</code>). The previous behaviour can be restored via a options, both function-local as well as global are supported. And of course, there is no change for all other (and more common) input formats, notably <code>character</code> or <code>factor</code>. A full list of changes follows.</p>
<blockquote>
<h4>Changes in anytime version 0.3.0 (2017-06-05)</h4>
<ul>
<li>
<p>Numeric input is now always an offset to epoch, with <code>anytime()</code> using seconds, and <code>anydate()</code> using dates. (<a rel="nofollow" href="https://github.com/eddelbuettel/anytime/pull/65" target="_blank">#65</a> fixing <a rel="nofollow" href="https://github.com/eddelbuettel/anytime/issues/63" target="_blank">#63</a>).</p>
</li>
<li>
<p>Old behaviour can be re-enabled with an option also supporting a global setting <code>getOption(&quot;anytimeOldHeuristic&quot;)</code></p>
</li>
<li>
<p>RStudio versions 1.1.129 or later can run all functions without fear of crashing due to a change in their use of Boost.</p>
</li>
<li>
<p>Replaced <code>init.c</code> with registration code inside of <code>RcppExports.cpp</code> thanks to Rcpp 0.12.11.</p>
</li>
</ul>
</blockquote>
<p>Courtesy of <a rel="nofollow" href="http://dirk.eddelbuettel.com/cranberries/" target="_blank">CRANberries</a>, there is a comparison to <a rel="nofollow" href="http://dirk.eddelbuettel.com/cranberries/2017/06/05#anytime_0.3.0" target="_blank">the previous release</a>. More information is on the <a rel="nofollow" href="http://dirk.eddelbuettel.com/code/anytime.html" target="_blank">anytime</a> page.</p>
<p>For questions or comments use the <a rel="nofollow" href="https://github.com/eddelbuettel/anytime/issues" target="_blank">issue tracker</a> off the <a rel="nofollow" href="https://github.com/eddelbuettel/anytime" target="_blank">GitHub repo</a>.</p>
<p>
This post by <a rel="nofollow" href="http://dirk.eddelbuettel.com/" target="_blank">Dirk Eddelbuettel</a> originated on his <a rel="nofollow" href="http://dirk.eddelbuettel.com/blog/" target="_blank">Thinking inside the box</a> blog. Please report excessive re-aggregation in third-party for-profit settings.</p>
<p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://dirk.eddelbuettel.com/blog/2017/06/05#anytime_0.3.0"> Thinking inside the box </a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...

	<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/V0UitRNdBcU" height="1"></a></div>