From 47aa30bc55ef07d26940ceb43bc875a0f4da84ba Mon Sep 17 00:00:00 2001 From: Evan Cortens Date: Sat, 27 Dec 2025 05:55:01 -0700 Subject: [PATCH] fixes a bug in forest() where the study_name column in the dataset is overridden as the data is not passed to combine_data from .combine_data_bi which causes the study names to be regenerated sequentially --- R/transformations.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/transformations.R b/R/transformations.R index 1397efd1..e448ee38 100644 --- a/R/transformations.R +++ b/R/transformations.R @@ -535,7 +535,7 @@ combine_data <- function(d = NULL, r = NULL, z = NULL, logOR = NULL, OR = NULL, logORse <- sqrt( 1/data$x1 + 1/data$x2 + 1/(data$n1 - data$x1) + 1/(data$n2 - data$x2) ) # Delegate to standard combine_data() for further transformations - return(combine_data(logOR = logOR, se = logORse, study_names = study_names, study_ids = study_ids, weight = weight, + return(combine_data(logOR = logOR, se = logORse, study_names = if(length(data$study_names)==nrow(data)) data$study_names else study_names, study_ids = study_ids, weight = weight, transformation = .transformation_invar(transformation, estimation = if(is.null(dots[["estimation"]])) FALSE else dots[["estimation"]]), estimation = if(is.null(dots[["estimation"]])) FALSE else dots[["estimation"]], return_all = return_all)) }