From a9bff2e058680aea607ff4798ff8775ea7a1e8d7 Mon Sep 17 00:00:00 2001 From: marcelcosta Date: Thu, 27 Mar 2025 15:06:00 +0100 Subject: [PATCH] Update 'R/ggstats_add_xy.R' change !!!sym_link for .data[[exclude_group]]. --- R/ggstats_add_xy.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ggstats_add_xy.R b/R/ggstats_add_xy.R index 30ae242..1968929 100644 --- a/R/ggstats_add_xy.R +++ b/R/ggstats_add_xy.R @@ -55,7 +55,7 @@ ggstats_add_xy<-function(table_stat, table, xcol=NULL, group, y="max", bracket.o if (!is.null(exclude_group)){ for (j in unique(pull(table_stat, all_of(exclude_group)))){ for (dia in unique(pull(table_stat,all_of(xcol)))){ - if (table_stat %>% filter(p < 0.05) %>% filter(.data[[x]] == dia & !!!syms(exclude_group) == j) %>% nrow() > 0){ + if (table_stat %>% filter(p < 0.05) %>% filter(.data[[x]] == dia & .data[[exclude_group]] == j) %>% nrow() > 0){ t[table_stat[,x] == dia & table_stat[,exclude_group] == j,"y.position"]<-seq(t[table_stat[,x] == dia & table_stat[,exclude_group] == j,"y.position"][[1,1]], t[table_stat[,x] == dia & table_stat[,exclude_group] == j,"y.position"][[1,1]]+diff(range(table[,value.var], na.rm = T))*bracket.inspace*(nrow(table_stat[table_stat[,x] == dia & table_stat[,exclude_group] == j,])-1), by=diff(range(table[,value.var], na.rm = T))*bracket.inspace)