Skip to content

Commit

Permalink
Allow suppressing of legend symbols in output via legend=NA.
Browse files Browse the repository at this point in the history
  • Loading branch information
wviechtb committed Aug 28, 2023
1 parent cad690b commit 30a2adc
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 7 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.3-12
Version: 4.3-13
Date: 2023-08-28
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
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# metafor 4.3-12 (2023-08-28)
# metafor 4.3-13 (2023-08-28)

- added `getmfopt()` and `setmfopt()` functions for getting and setting package options and made some of the options more flexible

Expand Down
7 changes: 6 additions & 1 deletion R/print.permutest.rma.uni.r
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ print.permutest.rma.uni <- function(x, digits=x$digits, signif.stars=getOption("
if (is.null(ddd$legend)) {
legend <- TRUE
} else {
legend <- .isTRUE(ddd$legend)
if (is.na(ddd$legend)) { # can suppress legend and legend symbols with legend=NA
legend <- FALSE
footsym <- rep("", 6)
} else {
legend <- .isTRUE(ddd$legend)
}
}

footsym <- .get.footsym()
Expand Down
7 changes: 6 additions & 1 deletion R/print.rma.mv.r
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ print.rma.mv <- function(x, digits, showfit=FALSE, signif.stars=getOption("show.
if (is.null(ddd$legend)) {
legend <- ifelse(inherits(x, "robust.rma"), TRUE, FALSE)
} else {
legend <- .isTRUE(ddd$legend)
if (is.na(ddd$legend)) { # can suppress legend and legend symbols with legend=NA
legend <- FALSE
footsym <- rep("", 6)
} else {
legend <- .isTRUE(ddd$legend)
}
}

.space()
Expand Down
7 changes: 6 additions & 1 deletion R/print.rma.uni.r
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ print.rma.uni <- function(x, digits, showfit=FALSE, signif.stars=getOption("show
if (is.null(ddd$legend)) {
legend <- ifelse(inherits(x, "robust.rma"), TRUE, FALSE)
} else {
legend <- .isTRUE(ddd$legend)
if (is.na(ddd$legend)) { # can suppress legend and legend symbols with legend=NA
legend <- FALSE
footsym <- rep("", 6)
} else {
legend <- .isTRUE(ddd$legend)
}
}

if (inherits(x, "rma.uni.trimfill")) {
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.3-12"
ver <- "4.3-13"

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.3--12-brightgreen.svg)](https://www.metafor-project.org/doku.php/installation#development_version)
[![devel Version](https://img.shields.io/badge/devel-4.3--13-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

0 comments on commit 30a2adc

Please sign in to comment.