From c0940ea50617719c8860bc9c8cc4b637ec24eea0 Mon Sep 17 00:00:00 2001 From: David Phillippo Date: Tue, 18 Jan 2022 12:30:11 +0000 Subject: [PATCH 1/5] Prepare next dev version --- DESCRIPTION | 2 +- NEWS.md | 2 ++ README.md | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8a999e53..2ec55e55 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: multinma Title: Bayesian Network Meta-Analysis of Individual and Aggregate Data -Version: 0.4.0 +Version: 0.4.0.9000 Authors@R: person(given = c("David", "M."), family = "Phillippo", diff --git a/NEWS.md b/NEWS.md index 8b738186..ee5c0cab 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,5 @@ +# multinma 0.4.0.9000 + # multinma 0.4.0 * Feature: Node-splitting models for assessing inconsistency are now available diff --git a/README.md b/README.md index a5bb748b..0ef20111 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,8 @@ paper: The `multinma` package can be cited as follows: > Phillippo, D. M. (2022). *multinma: Network Meta-Analysis of -> Individual and Aggregate Data in Stan*. R package version 0.4.0, doi: -> [10.5281/zenodo.3904454](https://doi.org/10.5281/zenodo.3904454). +> Individual and Aggregate Data in Stan*. R package version 0.4.0.9000, +> doi: [10.5281/zenodo.3904454](https://doi.org/10.5281/zenodo.3904454). When fitting ML-NMR models, please cite the methods paper: From 67c6c0b38ef26d5b1fc2f2b97dd58c7d6bb0ff67 Mon Sep 17 00:00:00 2001 From: Niels Dunnewind Date: Thu, 3 Feb 2022 18:35:38 +0100 Subject: [PATCH 2/5] Replace NA values without tidyr Using tidyr::replace_na() on a matrix does not appear to work anymore in tidyr 1.2.0. This base R alternative should fix this. --- R/nma.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/nma.R b/R/nma.R index f4484383..aa6a4ca4 100644 --- a/R/nma.R +++ b/R/nma.R @@ -1263,7 +1263,8 @@ nma.fit <- function(ipd_x, ipd_y, })) agd_arm_ncat <- rowSums(agd_arm_cat > 0) # Replace missing category counts with 0 (these will drop out of the likelihood) - agd_arm_r <- tidyr::replace_na(agd_arm_y$.r, 0) + agd_arm_r <- agd_arm_y$.r + agd_arm_r[is.na(agd_arm_r)] <- 0 agd_arm_n <- rowSums(agd_arm_y$.r, na.rm = TRUE) } From 107019737e6ee8539cb0c80c988853985b9ce604 Mon Sep 17 00:00:00 2001 From: David Phillippo Date: Fri, 4 Feb 2022 08:36:22 +0000 Subject: [PATCH 3/5] Update NEWS --- NEWS.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index ee5c0cab..d135cdb2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # multinma 0.4.0.9000 +* Fix: tidyr v1.2.0 breaks ordered multinomial models when some studies do not +report all categories (i.e. some multinomial category outcomes are `NA` in +`multi()`) (PR #11) + # multinma 0.4.0 * Feature: Node-splitting models for assessing inconsistency are now available From 4e6d86247d41747e2a4d04d6858bb3dd0f5b332f Mon Sep 17 00:00:00 2001 From: David Phillippo Date: Fri, 4 Feb 2022 10:59:38 +0000 Subject: [PATCH 4/5] Update CRAN comments --- cran-comments.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cran-comments.md b/cran-comments.md index c16a173f..5c4155da 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,6 +1,4 @@ -## Resubmission -This is a resubmission. I have reduced the size of the package tarball to 2.5 MB -(by compressing images in the vignettes). +This update fixes a bug introduced with tidyr 1.2.0 ## Test environments * local R installation (Windows 10), R 4.1.2 From d7a2ac878993ec6cc5409e4698f5a164c2ec5417 Mon Sep 17 00:00:00 2001 From: David Phillippo Date: Fri, 4 Feb 2022 11:23:11 +0000 Subject: [PATCH 5/5] Version 0.4.1 --- DESCRIPTION | 2 +- NEWS.md | 2 +- README.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2ec55e55..101573c4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: multinma Title: Bayesian Network Meta-Analysis of Individual and Aggregate Data -Version: 0.4.0.9000 +Version: 0.4.1 Authors@R: person(given = c("David", "M."), family = "Phillippo", diff --git a/NEWS.md b/NEWS.md index d135cdb2..ba8dfa6b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# multinma 0.4.0.9000 +# multinma 0.4.1 * Fix: tidyr v1.2.0 breaks ordered multinomial models when some studies do not report all categories (i.e. some multinomial category outcomes are `NA` in diff --git a/README.md b/README.md index 0ef20111..ee22f6c9 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,8 @@ paper: The `multinma` package can be cited as follows: > Phillippo, D. M. (2022). *multinma: Network Meta-Analysis of -> Individual and Aggregate Data in Stan*. R package version 0.4.0.9000, -> doi: [10.5281/zenodo.3904454](https://doi.org/10.5281/zenodo.3904454). +> Individual and Aggregate Data in Stan*. R package version 0.4.1, doi: +> [10.5281/zenodo.3904454](https://doi.org/10.5281/zenodo.3904454). When fitting ML-NMR models, please cite the methods paper: