|
|
@ -69,6 +69,14 @@ ggstats_add_xy<-function(table_stat, table, xcol=NULL, group, y="max", bracket.o |
|
|
|
by=diff(range(table[,value.var], na.rm = T))*bracket.inspace) |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
for (dia in unique(pull(table_stat,all_of(exclude_group)))){ |
|
|
|
t[table_stat[,exclude_group] == dia, "y.position"]<-seq(t[table_stat[,exclude_group] == dia,"y.position"][[1,1]], |
|
|
|
t[table_stat[,exclude_group] == dia,"y.position"][[1,1]]+ |
|
|
|
diff(range(table[,value.var], na.rm = T))* |
|
|
|
bracket.inspace*(nrow(table_stat[table_stat[,exclude_group] == dia,])-1), |
|
|
|
by=diff(range(table[,value.var], na.rm = T))*bracket.inspace) |
|
|
|
} |
|
|
|
} |
|
|
|
return(cbind(table_stat,t) %>% as_tibble) |
|
|
|
} |