Skip to content

Commit

Permalink
Improved flexibility for setting package options.
Browse files Browse the repository at this point in the history
  • Loading branch information
wviechtb committed Oct 23, 2023
1 parent e9972ee commit f66ba2d
Show file tree
Hide file tree
Showing 282 changed files with 344 additions and 324 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.5-3
Version: 4.5-4
Date: 2023-10-23
Title: Meta-Analysis Package for R
Authors@R: person(given = "Wolfgang", family = "Viechtbauer", role = c("aut","cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-3463-4063"))
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# metafor 4.5-3 (2023-10-23)
# metafor 4.5-4 (2023-10-23)

- a few minor fixes to the dynamic theming of plots based on the foreground and background colors of the plotting device

- slightly improved flexibility for setting package options

# metafor 4.4-0 (2023-09-27)

- added `getmfopt()` and `setmfopt()` functions for getting and setting package options and made some of the options more flexible
Expand Down
2 changes: 1 addition & 1 deletion R/AIC.rma.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AIC.rma <- function(object, ..., k=2, correct=FALSE) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma")

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

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma")

Expand Down
2 changes: 1 addition & 1 deletion R/addpoly.default.r
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ transf, atransf, targs, efac, col, border, lty, fonts, cex, constarea=FALSE, ...

#########################################################################

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

na.act <- getOption("na.action")

Expand Down
2 changes: 1 addition & 1 deletion R/addpoly.predict.rma.r
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ transf, atransf, targs, efac, col, border, lty, fonts, cex, constarea=FALSE, ...

#########################################################################

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="predict.rma")

Expand Down
2 changes: 1 addition & 1 deletion R/addpoly.rma.r
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ transf, atransf, targs, efac, col, border, lty, fonts, cex, ...) {

#########################################################################

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="rma")

Expand Down
2 changes: 1 addition & 1 deletion R/aggregate.escalc.r
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ aggregate.escalc <- function(x, cluster, time, obs, V, struct="CS", rho, phi,
weighted=TRUE, checkpd=TRUE, fun, na.rm=TRUE,
addk=FALSE, subset, select, digits, var.names, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="escalc")

Expand Down
2 changes: 1 addition & 1 deletion R/anova.rma.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
anova.rma <- function(object, object2, btt, X, att, Z, rhs, digits, refit=FALSE, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma", notap=c("rma.mh", "rma.peto"), notav="rma.glmm")

Expand Down
2 changes: 1 addition & 1 deletion R/baujat.rma.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
baujat.rma <- function(x, xlim, ylim, xlab, ylab, cex, symbol="ids", grid=TRUE, progbar=FALSE, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="rma", notav=c("rma.glmm", "rma.mv", "robust.rma", "rma.ls", "rma.gen", "rma.uni.selmodel"))

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

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

mlist <- list(...)

Expand Down
2 changes: 1 addition & 1 deletion R/blsplit.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
blsplit <- function(x, cluster, fun, args, sort=FALSE) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

if (missing(cluster))
stop(mstyle$stop("Must specify 'cluster' variable."))
Expand Down
2 changes: 1 addition & 1 deletion R/blup.rma.uni.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
blup.rma.uni <- function(x, level, digits, transf, targs, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="rma.uni", notav=c("rma.uni.selmodel", "rma.gen"))

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

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="matreg")

Expand Down
2 changes: 1 addition & 1 deletion R/coef.permutest.rma.uni.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
coef.permutest.rma.uni <- function(object, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="permutest.rma.uni")

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

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma")

Expand Down
2 changes: 1 addition & 1 deletion R/coef.summary.rma.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
coef.summary.rma <- function(object, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="summary.rma")

Expand Down
2 changes: 1 addition & 1 deletion R/confint.rma.glmm.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
confint.rma.glmm <- function(object, parm, level, digits, transf, targs, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma.glmm", notav="rma.glmm")

Expand Down
2 changes: 1 addition & 1 deletion R/confint.rma.ls.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
confint.rma.ls <- function(object, parm, level, fixed=FALSE, alpha, digits, transf, targs, verbose=FALSE, control, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma.ls")

Expand Down
2 changes: 1 addition & 1 deletion R/confint.rma.mh.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
confint.rma.mh <- function(object, parm, level, digits, transf, targs, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma.mh")

Expand Down
2 changes: 1 addition & 1 deletion R/confint.rma.mv.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
confint.rma.mv <- function(object, parm, level, fixed=FALSE, sigma2, tau2, rho, gamma2, phi, digits, transf, targs, verbose=FALSE, control, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma.mv")

Expand Down
2 changes: 1 addition & 1 deletion R/confint.rma.peto.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
confint.rma.peto <- function(object, parm, level, digits, transf, targs, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma.peto")

Expand Down
2 changes: 1 addition & 1 deletion R/confint.rma.uni.r
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

confint.rma.uni <- function(object, parm, level, fixed=FALSE, random=TRUE, type, digits, transf, targs, verbose=FALSE, control, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma.uni", notav=c("robust.rma", "rma.ls", "rma.gen"))

Expand Down
2 changes: 1 addition & 1 deletion R/confint.rma.uni.selmodel.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
confint.rma.uni.selmodel <- function(object, parm, level, fixed=FALSE, tau2, delta, digits, transf, targs, verbose=FALSE, control, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma.uni.selmodel")

Expand Down
2 changes: 1 addition & 1 deletion R/contrmat.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
contrmat <- function(data, grp1, grp2, last, shorten=FALSE, minlen=2, check=TRUE, append=TRUE) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

if (!is.data.frame(data))
data <- data.frame(data)
Expand Down
2 changes: 1 addition & 1 deletion R/conv.2x2.r
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
conv.2x2 <- function(ori, ri, x2i, ni, n1i, n2i, correct=TRUE, data, include,
var.names=c("ai","bi","ci","di"), append=TRUE, replace="ifna") {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

if (is.logical(replace)) {
if (isTRUE(replace)) {
Expand Down
2 changes: 1 addition & 1 deletion R/conv.delta.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
conv.delta <- function(yi, vi, ni, data, include, transf, var.names, append=TRUE, replace="ifna", ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

if (missing(yi) || missing(vi))
stop(mstyle$stop("Must specify 'yi' and 'vi' arguments."))
Expand Down
2 changes: 1 addition & 1 deletion R/conv.fivenum.r
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ conv.fivenum <- function(min, q1, median, q3, max, n, data, include,
method="default", dist="norm", transf=TRUE, test=TRUE,
var.names=c("mean","sd"), append=TRUE, replace="ifna", ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

if (missing(min) && missing(q1) && missing(median) && missing(q3) && missing(max))
stop(mstyle$stop("Must specify at least some of these arguments: 'min', 'q1', 'median', 'q3', 'max'."))
Expand Down
2 changes: 1 addition & 1 deletion R/conv.wald.r
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ conv.wald <- function(out, ci.lb, ci.ub, zval, pval, n, data, include,

# TODO: allow t-distribution based CIs/tests (then also need dfs argument)?

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

if (missing(out) && missing(ci.lb) && missing(ci.ub) && missing(zval) && missing(pval))
stop(mstyle$stop("Must specify at least some of these arguments: 'out', 'ci.lb', 'ci.ub', 'zval', 'pval'."))
Expand Down
2 changes: 1 addition & 1 deletion R/cooks.distance.rma.mv.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cooks.distance.rma.mv <- function(model, progbar=FALSE, cluster, reestimate=TRUE, parallel="no", ncpus=1, cl, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(model), must="rma.mv")

Expand Down
2 changes: 1 addition & 1 deletion R/cumul.rma.mh.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cumul.rma.mh <- function(x, order, digits, transf, targs, progbar=FALSE, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="rma.mh")

Expand Down
2 changes: 1 addition & 1 deletion R/cumul.rma.peto.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cumul.rma.peto <- function(x, order, digits, transf, targs, progbar=FALSE, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="rma.peto")

Expand Down
2 changes: 1 addition & 1 deletion R/cumul.rma.uni.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cumul.rma.uni <- function(x, order, digits, transf, targs, progbar=FALSE, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="rma.uni", notav=c("robust.rma", "rma.ls", "rma.gen", "rma.uni.selmodel"))

Expand Down
2 changes: 1 addition & 1 deletion R/deviance.rma.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
deviance.rma <- function(object, REML, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma")

Expand Down
2 changes: 1 addition & 1 deletion R/df.residual.rma.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
df.residual.rma <- function(object, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma")

Expand Down
2 changes: 1 addition & 1 deletion R/dfbetas.rma.mv.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dfbetas.rma.mv <- function(model, progbar=FALSE, cluster, reestimate=TRUE, parallel="no", ncpus=1, cl, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(model), must="rma.mv", notav="robust.rma")

Expand Down
2 changes: 1 addition & 1 deletion R/dfround.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dfround <- function(x, digits, drop0=TRUE) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

if (inherits(x, "matrix") && length(dim(x)) == 2L)
x <- data.frame(x, check.names=FALSE)
Expand Down
2 changes: 1 addition & 1 deletion R/emmprep.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
emmprep <- function(x, verbose=FALSE, ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="rma")

Expand Down
2 changes: 1 addition & 1 deletion R/escalc.r
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ data, slab, subset, include, add=1/2, to="only0", drop00=FALSE, vtype="LS", var.

### check argument specifications

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

if (missing(measure) && missing(yi))
stop(mstyle$stop("Must specify an effect size or outcome measure via the 'measure' argument."))
Expand Down
2 changes: 1 addition & 1 deletion R/fitstats.rma.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
fitstats.rma <- function(object, ..., REML) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma")

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

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(object), must="rma")

Expand Down
2 changes: 1 addition & 1 deletion R/forest.cumul.rma.r
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lty, fonts, cex, cex.lab, cex.axis, ...) {

#########################################################################

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="cumul.rma")

Expand Down
2 changes: 1 addition & 1 deletion R/forest.default.r
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lty, fonts, cex, cex.lab, cex.axis, ...) {

#########################################################################

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

na.act <- getOption("na.action")

Expand Down
2 changes: 1 addition & 1 deletion R/forest.rma.r
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ lty, fonts, cex, cex.lab, cex.axis, ...) {

#########################################################################

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="rma", notav=c("rma.ls", "rma.gen"))

Expand Down
2 changes: 1 addition & 1 deletion R/formula.rma.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
formula.rma <- function(x, type="mods", ...) {

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

.chkclass(class(x), must="rma")

Expand Down
2 changes: 1 addition & 1 deletion R/fsn.r
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ fsn <- function(x, vi, sei, subset, data, type, alpha=.05, target,

#########################################################################

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

na.act <- getOption("na.action")

Expand Down
2 changes: 1 addition & 1 deletion R/funnel.default.r
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ label=FALSE, offset=0.4, legend=FALSE, ...) {

#########################################################################

mstyle <- .get.mstyle("crayon" %in% .packages())
mstyle <- .get.mstyle()

na.act <- getOption("na.action")

Expand Down
Loading

0 comments on commit f66ba2d

Please sign in to comment.