From 8ee93cdd77ef3092aed411c3ce6db1f03a8b7d46 Mon Sep 17 00:00:00 2001
From: Christian Roever <christian.roever@med.uni-goettingen.de>
Date: Thu, 29 Sep 2022 12:50:07 +0200
Subject: [PATCH] adapted to new forestplot package version

---
 DESCRIPTION                 | 4 ++--
 R/bayesmeta.R               | 9 ++++-----
 R/bmr.R                     | 4 ++--
 man/bayesmeta-package.Rd    | 4 ++--
 man/forestplot.bayesmeta.Rd | 2 +-
 man/forestplot.bmr.Rd       | 2 +-
 man/forestplot.escalc.Rd    | 4 ++--
 7 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 87cb7a5..bf87954 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
 Package: bayesmeta
 Type: Package
 Title: Bayesian Random-Effects Meta-Analysis and Meta-Regression
-Version: 3.1
-Date: 2022-09-14
+Version: 3.2
+Date: 2022-09-29
 Authors@R: c(person(given="Christian", family="Roever", role=c("aut","cre"), 
                     email="christian.roever@med.uni-goettingen.de",
                     comment=c(ORCID="0000-0002-6911-698X")),
diff --git a/R/bayesmeta.R b/R/bayesmeta.R
index f5fac88..dfbf1f7 100644
--- a/R/bayesmeta.R
+++ b/R/bayesmeta.R
@@ -2213,7 +2213,7 @@ forestplot.bayesmeta <- function(x, labeltext,
                                  heterogeneity = TRUE,
                                  digits        = 2,
                                  plot          = TRUE,
-                                 fn.ci_norm, fn.ci_sum, col, legend, boxsize, ...)
+                                 fn.ci_norm, fn.ci_sum, col, legend=NULL, boxsize, ...)
 #
 # ARGUMENTS:
 #   x            :  a "bayesmeta" object.
@@ -2330,7 +2330,7 @@ forestplot.bayesmeta <- function(x, labeltext,
     boxsize <- c(rep(0.25,x$k+1), 0.4)
     if (prediction) boxsize <- c(boxsize, 0.2)
   }
-  if (shrinkage && missing(legend))
+  if (shrinkage && is.null(legend))
     legend  <- c("quoted estimate", "shrinkage estimate")
   # specify data for plotting:
   if (shrinkage) { # (show shrinkage intervals)
@@ -2387,7 +2387,7 @@ forestplot.escalc <- function(x, labeltext,
                               exponentiate  = FALSE,
                               digits        = 2,
                               plot          = TRUE,
-                              fn.ci_norm, fn.ci_sum, col, legend, boxsize, ...)
+                              fn.ci_norm, fn.ci_sum, col, boxsize, ...)
 #
 # ARGUMENTS:
 #   x            :  a "bayesmeta" object.
@@ -2516,8 +2516,7 @@ forestplot.escalc <- function(x, labeltext,
                                  fn.ci_norm = fn.ci_norm,
                                  fn.ci_sum  = fn.ci_sum,
                                  col        = col,
-                                 boxsize    = boxsize,
-                                 legend     = legend, ...)
+                                 boxsize    = boxsize, ...)
     plot(fp)
   }
   invisible(list("data"       = ma.dat[-1,],
diff --git a/R/bmr.R b/R/bmr.R
index 2695595..515f403 100644
--- a/R/bmr.R
+++ b/R/bmr.R
@@ -1960,7 +1960,7 @@ forestplot.bmr <- function(x,
                            digits        = 2,
                            decplaces.X,
                            plot          = TRUE,
-                           fn.ci_norm, fn.ci_sum, col, legend, boxsize, ...)
+                           fn.ci_norm, fn.ci_sum, col, legend=NULL, boxsize, ...)
 # ARGUMENTS:
 #   x            :  a "bmr" object.
 #   X.mean       :  regressor matrix for summary (mean) estimate(s)
@@ -2165,7 +2165,7 @@ forestplot.bmr <- function(x,
   if (missing(boxsize)) {
     boxsize <- c(rep(0.25,x$k+1), rep(0.4, meanNumber), rep(0.2, predNumber))
   }
-  if (shrinkage && missing(legend))
+  if (shrinkage && is.null(legend))
     legend  <- c("quoted estimate", "shrinkage estimate")
   # specify data for plotting:
   if (shrinkage) { # (show shrinkage intervals)
diff --git a/man/bayesmeta-package.Rd b/man/bayesmeta-package.Rd
index c691116..6e4725e 100644
--- a/man/bayesmeta-package.Rd
+++ b/man/bayesmeta-package.Rd
@@ -15,8 +15,8 @@
   \tabular{ll}{
     Package: \tab bayesmeta\cr
     Type:    \tab Package\cr
-    Version: \tab 3.1\cr
-    Date:    \tab 2022-09-14\cr
+    Version: \tab 3.2\cr
+    Date:    \tab 2022-09-29\cr
     License: \tab GPL (>=2)
   }
   The main functionality is provided by the \code{\link{bayesmeta}()}
diff --git a/man/forestplot.bayesmeta.Rd b/man/forestplot.bayesmeta.Rd
index 48a3cd3..bdc0ce9 100644
--- a/man/forestplot.bayesmeta.Rd
+++ b/man/forestplot.bayesmeta.Rd
@@ -13,7 +13,7 @@
   \method{forestplot}{bayesmeta}(x, labeltext, exponentiate=FALSE,
            prediction=TRUE, shrinkage=TRUE, heterogeneity=TRUE, 
            digits=2, plot=TRUE,
-           fn.ci_norm, fn.ci_sum, col, legend, boxsize, ...)
+           fn.ci_norm, fn.ci_sum, col, legend=NULL, boxsize, ...)
 }
 \arguments{
   \item{x}{
diff --git a/man/forestplot.bmr.Rd b/man/forestplot.bmr.Rd
index 9bf2e38..baa9020 100644
--- a/man/forestplot.bmr.Rd
+++ b/man/forestplot.bmr.Rd
@@ -14,7 +14,7 @@
            labeltext, exponentiate=FALSE,
            shrinkage=TRUE, heterogeneity=TRUE, 
            digits=2, decplaces.X, plot=TRUE,
-           fn.ci_norm, fn.ci_sum, col, legend, boxsize, ...)
+           fn.ci_norm, fn.ci_sum, col, legend=NULL, boxsize, ...)
 }
 \arguments{
   \item{x}{
diff --git a/man/forestplot.escalc.Rd b/man/forestplot.escalc.Rd
index 388d576..721288b 100644
--- a/man/forestplot.escalc.Rd
+++ b/man/forestplot.escalc.Rd
@@ -11,7 +11,7 @@
 \usage{
   \method{forestplot}{escalc}(x, labeltext, exponentiate=FALSE,
            digits=2, plot=TRUE,
-           fn.ci_norm, fn.ci_sum, col, legend, boxsize, ...)
+           fn.ci_norm, fn.ci_sum, col, boxsize, ...)
 }
 \arguments{
   \item{x}{
@@ -33,7 +33,7 @@
   \item{plot}{
     a logical flag indicating whether to actually generate a plot.
   }
-  \item{fn.ci_norm, fn.ci_sum, col, legend, boxsize, \ldots}{
+  \item{fn.ci_norm, fn.ci_sum, col, boxsize, \ldots}{
     other arguments passed on to the
     \pkg{forestplot} package's \code{\link[forestplot]{forestplot}}
     function (see also the help there).
-- 
GitLab