Revert "Corrigiendo diagonal."

This reverts commit 3e6ea2693c.
This commit is contained in:
Costa
2022-02-04 15:40:06 +01:00
parent 3e6ea2693c
commit 7c9e2b7f89
+2 -2
View File
@@ -10,14 +10,14 @@ ggcorrplot<-function(df, var, color="#FFFFFF00", stat="signif", tri="all"){
df<-mcor %>% as.data.frame()
if (tri == "lower"){
df[lower.tri(df, diag=F)]<-NA
df[lower.tri(df, diag=T)]<-NA
}
df<-df %>% add_column(Var1=rownames(mcor),.before=1) %>%
gather(Var2, Value, -Var1) %>% filter(!is.na(Value))
df.pval<-mpval %>% as.data.frame()
if (tri == "lower"){
df.pval[lower.tri(df.pval, diag=F)]<-NA
df.pval[lower.tri(df.pval, diag=T)]<-NA
}
df.pval<-df.pval %>% add_column(Var1=rownames(mpval),.before=1) %>%
gather(Var2, Value, -Var1) %>% filter(!is.na(Value))