<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/validate-version-1-5-is-out/"></div></div><div><a data-url="http://www.r-bloggers.com/validate-version-1-5-is-out/" data-counturl="http://www.r-bloggers.com/validate-version-1-5-is-out/" data-count="horizontal" data-text="validate version 1.5 is out" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.markvanderloo.eu/yaRb/2016/06/24/validate-version-1-5-is-out/"> R – Mark van der Loo</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>A new version of the <a target="_blank" href="http://www.markvanderloo.eu/yaRb/2016/03/25/easy-data-validation-with-the-validate-package/">validate</a> package for data validation was just accepted on CRAN and will be available on all mirrors in a few days.</p>
<p>The most important addition is that you can now reference the data set as a whole, using the “dot” syntax like so:</p>

<pre>iris %>% check_that(
    nrow(.)>100
  , &quot;Sepal.Width&quot; %in% names(.)) %>% 
summary()

  rule items passes fails nNA error warning                  expression
1   V1     1      1     0   0 FALSE   FALSE               nrow(.) > 100
2   V2     1      1     0   0 FALSE   FALSE &quot;Sepal.Width&quot; %in% names(.)</pre>

<p>Also, it is now possible to return a logical, even when the result is NA, by passing the <code>na.value</code> option.</p>

<pre>dat = data.frame(x=c(1,NA,-1))
v = validator(x > 0)
values(confront(dat,v))
        V1
[1,]  TRUE
[2,]    NA
[3,] FALSE
values(confront(dat,v,na.value=FALSE))
        V1
[1,]  TRUE
[2,] FALSE
[3,] FALSE</pre>

<p>A complete list of changes and bugfixes can be found in the NEWS file. Below I include changes in 1.4 since I did not write about it before.</p>
<p>I will be <a target="_blank" href="http://schedule.user2016.org/event/7BZE/data-validation-infrastructure-the-validate-package">talking</a> about this package at the upcoming <a target="_blank" href="http://user2016.org/">useR!2016</a> event, so join me if you’re interested!</p>
<p>version 0.1.5<br>
– The ‘.’ is now used to reference the validated data set as whole.<br>
– Small change in output of ‘compare’ to match the table in van den Broek et al. (2013)</p>
<p>version 0.1.4<br>
– ‘confront’ now emits a warining when variable name conflicts with name of a reference data set<br>
– Deprecated ‘validate_reset’, in favour of the shorter ‘reset’ (use ‘validate::reset’ in case of ambiguity)<br>
– Deprecated ‘validate_options’ in favour of the shorter ‘voptions’<br>
– New option na.value with default value NA, controlling the output when a rule evaluates to NA.<br>
– Added rules from the ESSnet on validation (deliverable 17) to automated tests.<br>
– added ‘grepl’ to allowed validation syntax (suggested by Dusan Sovic)<br>
– exported a few functions w/ keywords internal for extensibility<br>
– Bugfix: blocks sometimes reported wrong nr of blocks (in case of a single connected block.)<br>
– Bugfix: macro expansion failed when macros were reused in other macros.<br>
– Bugfix: certain nonlinear relations were recognized as linear<br>
– Bugfix: rules that use (anonymous) function definitions raised error when printed.</p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/validate-version-1-5-is-out/"></div></div><div><a data-url="http://www.r-bloggers.com/validate-version-1-5-is-out/" data-counturl="http://www.r-bloggers.com/validate-version-1-5-is-out/" data-count="vertical" data-text="validate version 1.5 is out" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.markvanderloo.eu/yaRb/2016/06/24/validate-version-1-5-is-out/"> R – Mark van der Loo</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/f9a2sPnTMH4"></a></div>