Skip to content

Commit

Permalink
fix calls to all.equal/expect_equal for R 4.1.x (#234) (#235)
Browse files Browse the repository at this point in the history
* fix calls to all.equal/expect_equal

* bump version + update NEWS

* update docs

* avoid CRAN note
  • Loading branch information
tnagler authored Jun 8, 2021
1 parent 3cf11de commit c3bd17e
Show file tree
Hide file tree
Showing 57 changed files with 219 additions and 155 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ vignettes/*.pdf
config.log
config.status
revdep/
.vscode/
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: rvinecopulib
Type: Package
Title: High Performance Algorithms for Vine Copula Modeling
Version: 0.5.5.1.0
Version: 0.5.5.1.1
Authors@R: c(
person("Thomas", "Nagler",, "[email protected]", role = c("aut", "cre")),
person("Thibault", "Vatter",, "[email protected]", role = c("aut"))
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# rvinecopulib 0.5.5.1.1 (December 15, 2020)

Maintenance release following the changes to `all.equal()` in R 4.1.x.


# rvinecopulib 0.5.5.1.0 (November 24, 2020)

Release following the updates of vinecopulib to 0.5.5, see
Expand Down
3 changes: 2 additions & 1 deletion R/bicop_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ ktau_to_par <- function(family, tau) {
#' fit <- bicop(u, family = "par", keep_data = TRUE)
#'
#' # Predictions
#' all.equal(predict(fit, u, "hfunc1"), fitted(fit, "hfunc1"))
#' all.equal(predict(fit, u, "hfunc1"), fitted(fit, "hfunc1"),
#' check.environment = FALSE)
#' @rdname predict_bicop
#' @export
predict.bicop_dist <- function(object, newdata, what = "pdf", ...) {
Expand Down
5 changes: 3 additions & 2 deletions R/getters.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@
#'
#' # get the structure
#' get_structure(vc)
#' all.equal(get_matrix(vc), mat, check.attributes = FALSE)
#' all(get_matrix(vc) == mat)
#'
#' # get pair-copulas
#' get_pair_copula(vc, 1, 1)
#' get_all_pair_copulas(vc)
#' all.equal(get_all_pair_copulas(vc), pcs, check.attributes = FALSE)
#' all.equal(get_all_pair_copulas(vc), pcs,
#' check.attributes = FALSE, check.environment = FALSE)
#' @return
#' The structure matrix, or pair-copulas, their parameters, Kendall's taus,
#' or families.
Expand Down
2 changes: 2 additions & 0 deletions R/tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,5 @@ print_fit_info <- function(x) {
get_seeds <- function() {
as.numeric(sprintf("%20.0f", runif(20, 1e6, 1e7)))
}


2 changes: 1 addition & 1 deletion R/vine_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ get_vine_dist_margin_summary <- function(vd) {
#' @examples
#' x <- sapply(1:5, function(i) rnorm(50))
#' fit <- vine(x, copula_controls = list(family_set = "par"), keep_data = TRUE)
#' all.equal(predict(fit, x), fitted(fit))
#' all.equal(predict(fit, x), fitted(fit), check.environment = FALSE)
predict.vine <- function(object, newdata, what = "pdf", n_mc = 10^4,
cores = 1, ...) {
stopifnot(what %in% c("pdf", "cdf"))
Expand Down
2 changes: 1 addition & 1 deletion R/vinecop_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ summary.vinecop_dist <- function(object, ...) {
#' @examples
#' u <- sapply(1:5, function(i) runif(50))
#' fit <- vinecop(u, family = "par", keep_data = TRUE)
#' all.equal(predict(fit, u), fitted(fit))
#' all.equal(predict(fit, u), fitted(fit), check.environment = FALSE)
predict.vinecop <- function(object, newdata, what = "pdf", n_mc = 10^4,
cores = 1, ...) {
assert_that(
Expand Down
5 changes: 2 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
Fixes "uninitialised value" detected by valgrind
(https://cran.r-project.org/web/checks/check_results_rvinecopulib.html).
Maintenance release following the changes to `all.equal()` in R 4.1.x.

## Test environments

* CRAN win builder (devel)
* Windows Server 2019 (release)
* macOS (release)
* ubuntu 16.04 (release, oldrel, devel)
* ubuntu 20.04 with valgrind (release)
* ubuntu 20.04 (release)

## R CMD check results

Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pandoc: 2.7.3
pkgdown: 1.5.1
pkgdown_sha: ~
articles: []
last_built: 2020-11-23T18:30Z
last_built: 2020-12-15T08:12Z

2 changes: 1 addition & 1 deletion docs/reference/as_rvine_structure.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/bicop.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/bicop_dist.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/bicop_methods.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions docs/reference/getters.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/mBICV.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/pairs_copula_data.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/par_to_ktau.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/plot.bicop_dist.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/plot.rvine_structure.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/plot.vinecop_dist.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions docs/reference/predict_bicop.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/predict_vine.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c3bd17e

Please sign in to comment.