| 
																	
																	
																		
																			
																		
																	
																	
																 | 
																@ -70,12 +70,12 @@ ggstats_add_xy<-function(table_stat, table, xcol=NULL, group, y="max", bracket.o | 
															
														
														
													
														
															
																 | 
																 | 
																      } | 
																 | 
																 | 
																      } | 
															
														
														
													
														
															
																 | 
																 | 
																    } | 
																 | 
																 | 
																    } | 
															
														
														
													
														
															
																 | 
																 | 
																  }else{ | 
																 | 
																 | 
																  }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) | 
																 | 
																 | 
																 | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																    for (dia in unique(pull(mutate(table_stat,dia=paste0(!!!syms(exclude_group))),dia))){ | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																      t[apply(table_stat[,exclude_group], 1, paste, collapse="") == dia, "y.position"]<-seq(t[apply(table_stat[,exclude_group], 1, paste, collapse="") == dia,"y.position"][[1,1]], | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                                                                                            t[apply(table_stat[,exclude_group], 1, paste, collapse="") == dia,"y.position"][[1,1]]+ | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                                                                                              diff(range(table[,value.var], na.rm = T))* | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                                                                                              bracket.inspace*(nrow(table_stat[apply(table_stat[,exclude_group], 1, paste, collapse="") == dia,])-1), | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                                                                                            by=diff(range(table[,value.var], na.rm = T))*bracket.inspace) | 
															
														
														
													
														
															
																 | 
																 | 
																    } | 
																 | 
																 | 
																    } | 
															
														
														
													
														
															
																 | 
																 | 
																  } | 
																 | 
																 | 
																  } | 
															
														
														
													
														
															
																 | 
																 | 
																  return(cbind(table_stat,t) %>% as_tibble) | 
																 | 
																 | 
																  return(cbind(table_stat,t) %>% as_tibble) | 
															
														
														
													
												
													
														
															
																| 
																	
																	
																	
																 | 
																
 |