Skip to content

Commit

Permalink
Avoid problems with profile() and confint() when metafor is not direc…
Browse files Browse the repository at this point in the history
…tly loaded.
  • Loading branch information
wviechtb committed Oct 28, 2024
1 parent a535152 commit 9ddf439
Show file tree
Hide file tree
Showing 128 changed files with 163 additions and 132 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: metafor
Version: 4.7-41
Version: 4.7-42
Date: 2024-10-28
Title: Meta-Analysis Package for R
Authors@R: person(given = "Wolfgang", family = "Viechtbauer", role = c("aut","cre"), email = "wvb@metafor-project.org", comment = c(ORCID = "0000-0003-3463-4063"))
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# metafor 4.7-41 (2024-10-28)
# metafor 4.7-42 (2024-10-28)

- some general changes to the various `forest()` functions: argument `header` is now `TRUE` by default, the y-axis is now created with `yaxs="i"`, and the y-axis limits have been tweaked slightly in accordance

Expand Down
1 change: 1 addition & 0 deletions R/confint.rma.ls.r
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ confint.rma.ls <- function(object, parm, level, fixed=FALSE, alpha, digits, tran
cl.vc$alpha <- pos
cl.vc$time <- FALSE
#cl.vc$object <- quote(x)
cl.vc[[1]] <- str2lang("metafor::confint.rma.ls")
if (verbose)
cat(mstyle$verbose(paste("\nObtaining CI for alpha =", pos, "\n")))
res.all[[j]] <- eval(cl.vc, envir=parent.frame())
Expand Down
5 changes: 5 additions & 0 deletions R/confint.rma.mv.r
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ confint.rma.mv <- function(object, parm, level, fixed=FALSE, sigma2, tau2, rho,
cl.vc$sigma2 <- pos
cl.vc$time <- FALSE
#cl.vc$object <- quote(x)
cl.vc[[1]] <- str2lang("metafor::confint.rma.mv")
if (verbose)
cat(mstyle$verbose(paste("\nObtaining CI for sigma2 =", pos, "\n")))
res.all[[j]] <- eval(cl.vc, envir=parent.frame())
Expand All @@ -89,6 +90,7 @@ confint.rma.mv <- function(object, parm, level, fixed=FALSE, sigma2, tau2, rho,
cl.vc$tau2 <- pos
cl.vc$time <- FALSE
#cl.vc$object <- quote(x)
cl.vc[[1]] <- str2lang("metafor::confint.rma.mv")
if (verbose)
cat(mstyle$verbose(paste("\nObtaining CI for tau2 =", pos, "\n")))
res.all[[j]] <- eval(cl.vc, envir=parent.frame())
Expand All @@ -101,6 +103,7 @@ confint.rma.mv <- function(object, parm, level, fixed=FALSE, sigma2, tau2, rho,
cl.vc$rho <- pos
cl.vc$time <- FALSE
#cl.vc$object <- quote(x)
cl.vc[[1]] <- str2lang("metafor::confint.rma.mv")
if (verbose)
cat(mstyle$verbose(paste("\nObtaining CI for rho =", pos, "\n")))
res.all[[j]] <- eval(cl.vc, envir=parent.frame())
Expand All @@ -116,6 +119,7 @@ confint.rma.mv <- function(object, parm, level, fixed=FALSE, sigma2, tau2, rho,
cl.vc$gamma2 <- pos
cl.vc$time <- FALSE
#cl.vc$object <- quote(x)
cl.vc[[1]] <- str2lang("metafor::confint.rma.mv")
if (verbose)
cat(mstyle$verbose(paste("\nObtaining CI for gamma2 =", pos, "\n")))
res.all[[j]] <- eval(cl.vc, envir=parent.frame())
Expand All @@ -128,6 +132,7 @@ confint.rma.mv <- function(object, parm, level, fixed=FALSE, sigma2, tau2, rho,
cl.vc$phi <- pos
cl.vc$time <- FALSE
#cl.vc$object <- quote(x)
cl.vc[[1]] <- str2lang("metafor::confint.rma.mv")
if (verbose)
cat(mstyle$verbose(paste("\nObtaining CI for phi =", pos, "\n")))
res.all[[j]] <- eval(cl.vc, envir=parent.frame())
Expand Down
2 changes: 2 additions & 0 deletions R/confint.rma.uni.selmodel.r
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ confint.rma.uni.selmodel <- function(object, parm, level, fixed=FALSE, tau2, del
cl.vc$tau2 <- 1
cl.vc$time <- FALSE
#cl.vc$object <- quote(x)
cl.vc[[1]] <- str2lang("metafor::confint.rma.uni.selmodel")
if (verbose)
cat(mstyle$verbose(paste("\nObtaining CI for tau2\n")))
res.all[[j]] <- eval(cl.vc, envir=parent.frame())
Expand All @@ -90,6 +91,7 @@ confint.rma.uni.selmodel <- function(object, parm, level, fixed=FALSE, tau2, del
cl.vc$delta <- pos
cl.vc$time <- FALSE
#cl.vc$object <- quote(x)
cl.vc[[1]] <- str2lang("metafor::confint.rma.uni.selmodel")
if (verbose)
cat(mstyle$verbose(paste("\nObtaining CI for delta =", pos, "\n")))
res.all[[j]] <- eval(cl.vc, envir=parent.frame())
Expand Down
1 change: 1 addition & 0 deletions R/profile.rma.ls.r
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ profile.rma.ls <- function(fitted, alpha,
mc.vc$alpha <- pos
mc.vc$time <- FALSE
#mc.vc$fitted <- quote(x)
mc.vc[[1]] <- str2lang("metafor::profile.rma.ls")
if (progbar)
cat(mstyle$verbose(paste("Profiling alpha =", pos, "\n")))
sav[[j]] <- eval(mc.vc, envir=parent.frame())
Expand Down
5 changes: 5 additions & 0 deletions R/profile.rma.mv.r
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ profile.rma.mv <- function(fitted, sigma2, tau2, rho, gamma2, phi,
mc.vc$sigma2 <- pos
mc.vc$time <- FALSE
#mc.vc$fitted <- quote(x)
mc.vc[[1]] <- str2lang("metafor::profile.rma.mv")
if (progbar)
cat(mstyle$verbose(paste("Profiling sigma2 =", pos, "\n")))
sav[[j]] <- eval(mc.vc, envir=parent.frame())
Expand All @@ -110,6 +111,7 @@ profile.rma.mv <- function(fitted, sigma2, tau2, rho, gamma2, phi,
mc.vc$tau2 <- pos
mc.vc$time <- FALSE
#mc.vc$fitted <- quote(x)
mc.vc[[1]] <- str2lang("metafor::profile.rma.mv")
if (progbar)
cat(mstyle$verbose(paste("Profiling tau2 =", pos, "\n")))
sav[[j]] <- eval(mc.vc, envir=parent.frame())
Expand All @@ -122,6 +124,7 @@ profile.rma.mv <- function(fitted, sigma2, tau2, rho, gamma2, phi,
mc.vc$rho <- pos
mc.vc$time <- FALSE
#mc.vc$fitted <- quote(x)
mc.vc[[1]] <- str2lang("metafor::profile.rma.mv")
if (progbar)
cat(mstyle$verbose(paste("Profiling rho =", pos, "\n")))
sav[[j]] <- eval(mc.vc, envir=parent.frame())
Expand All @@ -137,6 +140,7 @@ profile.rma.mv <- function(fitted, sigma2, tau2, rho, gamma2, phi,
mc.vc$gamma2 <- pos
mc.vc$time <- FALSE
#mc.vc$fitted <- quote(x)
mc.vc[[1]] <- str2lang("metafor::profile.rma.mv")
if (progbar)
cat(mstyle$verbose(paste("Profiling gamma2 =", pos, "\n")))
sav[[j]] <- eval(mc.vc, envir=parent.frame())
Expand All @@ -149,6 +153,7 @@ profile.rma.mv <- function(fitted, sigma2, tau2, rho, gamma2, phi,
mc.vc$phi <- pos
mc.vc$time <- FALSE
#mc.vc$fitted <- quote(x)
mc.vc[[1]] <- str2lang("metafor::profile.rma.mv")
if (progbar)
cat(mstyle$verbose(paste("Profiling phi =", pos, "\n")))
sav[[j]] <- eval(mc.vc, envir=parent.frame())
Expand Down
2 changes: 2 additions & 0 deletions R/profile.rma.uni.selmodel.r
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ profile.rma.uni.selmodel <- function(fitted, tau2, delta,
mc.vc$tau2 <- 1
mc.vc$time <- FALSE
#mc.vc$fitted <- quote(x)
mc.vc[[1]] <- str2lang("metafor::profile.rma.uni.selmodel")
if (progbar)
cat(mstyle$verbose(paste("Profiling tau2\n")))
sav[[j]] <- eval(mc.vc, envir=parent.frame())
Expand All @@ -107,6 +108,7 @@ profile.rma.uni.selmodel <- function(fitted, tau2, delta,
mc.vc$delta <- pos
mc.vc$time <- FALSE
#mc.vc$fitted <- quote(x)
mc.vc[[1]] <- str2lang("metafor::profile.rma.uni.selmodel")
if (progbar)
cat(mstyle$verbose(paste("Profiling delta =", pos, "\n")))
sav[[j]] <- eval(mc.vc, envir=parent.frame())
Expand Down
2 changes: 1 addition & 1 deletion R/rma.mv.r
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ cvvc=FALSE, sparse=FALSE, verbose=FALSE, digits, control, ...) {

}

mf.r <- unname(mf.r)
mf.r <- unname(mf.r) # to avoid problems when list elements in 'random' are named

### warn that 'struct' argument is disregarded if it has been specified, but model contains no '~ inner | outer' terms

Expand Down
2 changes: 1 addition & 1 deletion R/zzz.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.onAttach <- function(libname, pkgname) {

ver <- "4.7-41"
ver <- "4.7-42"

loadmsg <- paste0("\nLoading the 'metafor' package (version ", ver, "). For an\nintroduction to the package please type: help(metafor)\n")

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metafor: A Meta-Analysis Package for R
[![R build status](https://github.com/wviechtb/metafor/workflows/R-CMD-check/badge.svg)](https://github.com/wviechtb/metafor/actions)
[![Code Coverage](https://codecov.io/gh/wviechtb/metafor/branch/master/graph/badge.svg)](https://app.codecov.io/gh/wviechtb/metafor)
[![CRAN Version](https://www.r-pkg.org/badges/version/metafor)](https://cran.r-project.org/package=metafor)
[![devel Version](https://img.shields.io/badge/devel-4.7--41-brightgreen.svg)](https://www.metafor-project.org/doku.php/installation#development_version)
[![devel Version](https://img.shields.io/badge/devel-4.7--42-brightgreen.svg)](https://www.metafor-project.org/doku.php/installation#development_version)
[![Monthly Downloads](https://cranlogs.r-pkg.org/badges/metafor)](https://cranlogs.r-pkg.org/badges/metafor)
[![Total Downloads](https://cranlogs.r-pkg.org/badges/grand-total/metafor)](https://cranlogs.r-pkg.org/badges/grand-total/metafor)

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/ISSUE_TEMPLATE.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/articles/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/articles/pkgdown/diagram.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.

4 changes: 2 additions & 2 deletions docs/index.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/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 @@ -3,7 +3,7 @@ pkgdown: 2.1.1.9000
pkgdown_sha: 0a18bc718640aee7160a0ebbcdef5ecaae2ac4a4
articles:
pkgdown/diagram: pkgdown/diagram.html
last_built: 2024-10-28T07:24Z
last_built: 2024-10-28T15:03Z
urls:
reference: https://wviechtb.github.io/metafor/reference
article: https://wviechtb.github.io/metafor/articles
2 changes: 1 addition & 1 deletion docs/reference/addpoly.default.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/addpoly.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/addpoly.predict.rma.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/addpoly.rma.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/aggregate.escalc.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/anova.rma.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/baujat.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/bldiag.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/blsplit.html

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

Loading

0 comments on commit 9ddf439

Please sign in to comment.