From 19104be0274e6dee1337c0274ddc682075f570bf Mon Sep 17 00:00:00 2001 From: neilstats Date: Thu, 6 Jun 2024 22:56:20 +0100 Subject: [PATCH] fix error from get_horizontal_spacing() fix error from get_horizontal_spacing() when right.space, left.space, col.right.pos and col.left.pos arguments are all specified --- DESCRIPTION | 2 +- NEWS.md | 4 ++++ R/forest-plot.R | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index 42d4a71..50379d3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -3,7 +3,7 @@ Title: Create CKB Plots Description: ckbplotr provides functions to help create and style plots in R. It is being developed by, and primarily for, China Kadoorie Biobank researchers. -Version: 0.11.0 +Version: 0.11.1 Authors@R: person(given = "Neil", family = "Wright", diff --git a/NEWS.md b/NEWS.md index 335a9cd..b9517a0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # ckbplotr 0.11.0 +* fix error from get_horizontal_spacing() when right.space, left.space, col.right.pos and col.left.pos arguments are all specified. + +# ckbplotr 0.11.0 + * addaes/addarg in forest_plot() can now also be used for column headings and diamonds. * addtext in forest_plot() can be used to display plotmath. * valign and halign arguments added to prepare_figure() and save_figure() diff --git a/R/forest-plot.R b/R/forest-plot.R index 3b55df8..72da2dc 100644 --- a/R/forest-plot.R +++ b/R/forest-plot.R @@ -739,6 +739,7 @@ get_horizontal_spacing <- function(right.space, } ## calculate automatic col.right.pos and col.right.space + text_about_auto_spacing <- NULL if (is.null(right.space) | is.null(col.right.pos) | is.null(left.space) | is.null(col.left.pos)){ text_about_auto_spacing <- "Automatically calculated horizontal spacing and positioning:\n" }