Corregir bug, en cada panel salía misma y.
This commit is contained in:
@@ -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)
|
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)
|
return(cbind(table_stat,t) %>% as_tibble)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user