Skip to content

Commit

Permalink
Merge branch 'feature/fix_network_plot_nstudy' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
dmphillippo committed Apr 25, 2024
2 parents c40a1fa + 2bf4527 commit 7d55c9e
Show file tree
Hide file tree
Showing 45 changed files with 8,303 additions and 6,652 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/commit-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:

- name: Commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected].github.com"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add man/\* NAMESPACE
git commit -m 'Document'
git push
Expand Down Expand Up @@ -64,8 +64,8 @@ jobs:

- name: Commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected].github.com"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add vignettes/\* tests/testthat/\*.R
git commit -m 'Build pre-compiled vignettes'
git push
8 changes: 4 additions & 4 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:

- name: Commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected].github.com"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add man/\* NAMESPACE
git commit -m 'Document'
Expand Down Expand Up @@ -75,8 +75,8 @@ jobs:

- name: Commit
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected].github.com"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add vignettes/\* tests/testthat/\*.R
git commit -m 'Build pre-compiled vignettes'
Expand Down
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: multinma
Title: Bayesian Network Meta-Analysis of Individual and Aggregate Data
Version: 0.6.1.9002
Version: 0.6.1.9003
Authors@R:
person(given = c("David", "M."),
family = "Phillippo",
Expand Down Expand Up @@ -57,6 +57,7 @@ RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
Suggests:
testthat (>= 2.1.0),
vdiffr,
withr,
knitr,
rmarkdown,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
installed now works properly, rather than giving errors.
* Fix: Small bug caused `predict()` for AgD meta-regression models with new data
and `baseline_type = "response"` to fail with an error.
* Fix: The number of studies on a contrast in a network plot `plot.nma_data()`
with `weight_edges = TRUE` was incorrect when a study had multiple arms of the
same treatment. This now correctly counts the number of studies making a
comparison, rather than the number of arms.

# multinma 0.6.1

Expand Down
4 changes: 2 additions & 2 deletions R/nma_data-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ as.igraph.nma_data <- function(x, ..., collapse = TRUE) {
if (collapse) {
e_ipd <- e_ipd %>%
dplyr::group_by(.data$.trt, .data$.trt_b) %>%
dplyr::summarise(.nstudy = dplyr::n(), .type = "IPD")
dplyr::summarise(.nstudy = dplyr::n_distinct(.data$.study), .type = "IPD")
} else {
e_ipd$.type <- "IPD"
}
Expand All @@ -300,7 +300,7 @@ as.igraph.nma_data <- function(x, ..., collapse = TRUE) {
if (collapse) {
e_agd <- e_agd %>%
dplyr::group_by(.data$.trt, .data$.trt_b) %>%
dplyr::summarise(.nstudy = dplyr::n(), .type = "AgD")
dplyr::summarise(.nstudy = dplyr::n_distinct(.data$.study), .type = "AgD")
} else {
e_agd$.type <- "AgD"
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
125 changes: 125 additions & 0 deletions tests/testthat/_snaps/plot_nma_data/atrial-fibrillation-network.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions tests/testthat/_snaps/plot_nma_data/bcg-vaccine-network.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions tests/testthat/_snaps/plot_nma_data/blocker-network.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7d55c9e

Please sign in to comment.