From d7fa35fcac8eba02a3587e348ce6831a4e2c658e Mon Sep 17 00:00:00 2001 From: Tony Fischetti Date: Wed, 5 Feb 2020 16:15:45 -0500 Subject: [PATCH] fixed issues with R-devel --- CRAN-RELEASE | 2 -- DESCRIPTION | 2 +- NEWS | 6 ++++++ R/assertions.R | 2 +- cran-comments.md | 4 ++-- man/assert.Rd | 19 +++++++++++++++---- man/assert_rows.Rd | 21 +++++++++++++++++---- man/assertr.Rd | 1 - man/chaining_functions.Rd | 3 +-- man/insist.Rd | 19 +++++++++++++++---- man/insist_rows.Rd | 21 +++++++++++++++++---- man/maha_dist.Rd | 3 +-- man/verify.Rd | 3 +-- man/within_bounds.Rd | 9 +++++++-- 14 files changed, 84 insertions(+), 31 deletions(-) delete mode 100644 CRAN-RELEASE diff --git a/CRAN-RELEASE b/CRAN-RELEASE deleted file mode 100644 index 7bec63c..0000000 --- a/CRAN-RELEASE +++ /dev/null @@ -1,2 +0,0 @@ -This package was submitted to CRAN on 2019-01-22. -Once it is accepted, delete this file and tag the release (commit e7b6587ab5). diff --git a/DESCRIPTION b/DESCRIPTION index 8ec7744..dba5701 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -28,5 +28,5 @@ Suggests: testthat, magrittr VignetteBuilder: knitr -RoxygenNote: 6.1.1 +RoxygenNote: 7.0.2 Encoding: UTF-8 diff --git a/NEWS b/NEWS index daf3ee9..92e2f84 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +# assertr 2.7 + +* added "inverse" option to predicates + +* bugs due to changes in r-devel and package dependencies fixed + # assertr 2.6 * bugs due to changes in rlang 0.3.0 fixed. diff --git a/R/assertions.R b/R/assertions.R index b855847..2124092 100644 --- a/R/assertions.R +++ b/R/assertions.R @@ -89,7 +89,7 @@ assert <- function(data, predicate, ..., success_fun=success_continue, return(apply.predicate.to.vector(this.vector, predicate))}) - if(class(log.mat)=="logical"){ + if("logical" %in% class(log.mat)){ log.mat <- matrix(log.mat) colnames(log.mat) <- colnames(sub.frame) } diff --git a/cran-comments.md b/cran-comments.md index 6d7c603..36b7e70 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,6 @@ ## Test environments -* local macOS Sierra 10.14 install, R 3.5.2 -* ubuntu (on travis-ci), R 3.5.1 +* local macOS High Sierra 10.13 install, R 3.6.0 +* local Debian 10, R-devel * win-builder (devel and release) ## R CMD check results diff --git a/man/assert.Rd b/man/assert.Rd index abe7396..6de8635 100644 --- a/man/assert.Rd +++ b/man/assert.Rd @@ -5,11 +5,22 @@ \alias{assert_} \title{Raises error if predicate is FALSE in any columns selected} \usage{ -assert(data, predicate, ..., success_fun = success_continue, - error_fun = error_stop) +assert( + data, + predicate, + ..., + success_fun = success_continue, + error_fun = error_stop +) -assert_(data, predicate, ..., .dots, success_fun = success_continue, - error_fun = error_stop) +assert_( + data, + predicate, + ..., + .dots, + success_fun = success_continue, + error_fun = error_stop +) } \arguments{ \item{data}{A data frame} diff --git a/man/assert_rows.Rd b/man/assert_rows.Rd index b5eb62b..6f99040 100644 --- a/man/assert_rows.Rd +++ b/man/assert_rows.Rd @@ -6,11 +6,24 @@ \title{Raises error if predicate is FALSE for any row after applying row reduction function} \usage{ -assert_rows(data, row_reduction_fn, predicate, ..., - success_fun = success_continue, error_fun = error_stop) +assert_rows( + data, + row_reduction_fn, + predicate, + ..., + success_fun = success_continue, + error_fun = error_stop +) -assert_rows_(data, row_reduction_fn, predicate, ..., .dots, - success_fun = success_continue, error_fun = error_stop) +assert_rows_( + data, + row_reduction_fn, + predicate, + ..., + .dots, + success_fun = success_continue, + error_fun = error_stop +) } \arguments{ \item{data}{A data frame} diff --git a/man/assertr.Rd b/man/assertr.Rd index a8ed5be..43152d6 100644 --- a/man/assertr.Rd +++ b/man/assertr.Rd @@ -3,7 +3,6 @@ \docType{package} \name{assertr} \alias{assertr} -\alias{assertr-package} \title{assertr: Assertive programming for R analysis pipeline.} \description{ The assertr package supplies a suite of functions designed to verify diff --git a/man/chaining_functions.Rd b/man/chaining_functions.Rd index aff49da..bdc894d 100644 --- a/man/chaining_functions.Rd +++ b/man/chaining_functions.Rd @@ -8,8 +8,7 @@ \usage{ chain_start(data) -chain_end(data, success_fun = success_continue, - error_fun = error_report) +chain_end(data, success_fun = success_continue, error_fun = error_report) } \arguments{ \item{data}{A data frame} diff --git a/man/insist.Rd b/man/insist.Rd index da8c2ff..31d642e 100644 --- a/man/insist.Rd +++ b/man/insist.Rd @@ -6,11 +6,22 @@ \title{Raises error if dynamically created predicate is FALSE in any columns selected} \usage{ -insist(data, predicate_generator, ..., success_fun = success_continue, - error_fun = error_stop) +insist( + data, + predicate_generator, + ..., + success_fun = success_continue, + error_fun = error_stop +) -insist_(data, predicate_generator, ..., .dots, - success_fun = success_continue, error_fun = error_stop) +insist_( + data, + predicate_generator, + ..., + .dots, + success_fun = success_continue, + error_fun = error_stop +) } \arguments{ \item{data}{A data frame} diff --git a/man/insist_rows.Rd b/man/insist_rows.Rd index 8b77a62..1b710ef 100644 --- a/man/insist_rows.Rd +++ b/man/insist_rows.Rd @@ -6,11 +6,24 @@ \title{Raises error if dynamically created predicate is FALSE for any row after applying row reduction function} \usage{ -insist_rows(data, row_reduction_fn, predicate_generator, ..., - success_fun = success_continue, error_fun = error_stop) +insist_rows( + data, + row_reduction_fn, + predicate_generator, + ..., + success_fun = success_continue, + error_fun = error_stop +) -insist_rows_(data, row_reduction_fn, predicate_generator, ..., .dots, - success_fun = success_continue, error_fun = error_stop) +insist_rows_( + data, + row_reduction_fn, + predicate_generator, + ..., + .dots, + success_fun = success_continue, + error_fun = error_stop +) } \arguments{ \item{data}{A data frame} diff --git a/man/maha_dist.Rd b/man/maha_dist.Rd index dad9fd0..c0e360c 100644 --- a/man/maha_dist.Rd +++ b/man/maha_dist.Rd @@ -4,8 +4,7 @@ \alias{maha_dist} \title{Computes mahalanobis distance for each row of data frame} \usage{ -maha_dist(data, keep.NA = TRUE, robust = FALSE, - stringsAsFactors = FALSE) +maha_dist(data, keep.NA = TRUE, robust = FALSE, stringsAsFactors = FALSE) } \arguments{ \item{data}{A data frame} diff --git a/man/verify.Rd b/man/verify.Rd index 8ba246c..34a21b9 100644 --- a/man/verify.Rd +++ b/man/verify.Rd @@ -4,8 +4,7 @@ \alias{verify} \title{Raises error if expression is FALSE anywhere} \usage{ -verify(data, expr, success_fun = success_continue, - error_fun = error_stop) +verify(data, expr, success_fun = success_continue, error_fun = error_stop) } \arguments{ \item{data}{A data frame, list, or environment} diff --git a/man/within_bounds.Rd b/man/within_bounds.Rd index a67dd8a..b734d07 100644 --- a/man/within_bounds.Rd +++ b/man/within_bounds.Rd @@ -4,8 +4,13 @@ \alias{within_bounds} \title{Creates bounds checking predicate} \usage{ -within_bounds(lower.bound, upper.bound, include.lower = TRUE, - include.upper = TRUE, allow.na = TRUE) +within_bounds( + lower.bound, + upper.bound, + include.lower = TRUE, + include.upper = TRUE, + allow.na = TRUE +) } \arguments{ \item{lower.bound}{The lowest permitted value}