Añadiendo los stats none y pval.

This commit is contained in:
2022-02-05 08:15:40 +01:00
parent c7104d3903
commit f6b014b0b8
+5 -1
View File
@@ -29,10 +29,14 @@ ggcorrplot<-function(df, var, color="#FFFFFF00", stat="signif", tri="all"){
gather(Var2, Value, -Var1) %>% filter(!is.na(Value))
df.pval$Value<-round(df.pval$Value, 3)
if (!stat %in% c("signif","none","pval")){stat<-"signif"}
if (stat=="signif"){
df.pval$Value<-gtools::stars.pval(df.pval$Value)
}
if (stat=="none"){
df.pval$Value<-""
}
df$Var1<-factor(df$Var1, levels=order$x)
df$Var2<-factor(df$Var2, levels=order$y)