From 4ed03c2e25b6d3f8e34bd46a669fc25a3bd80a9a Mon Sep 17 00:00:00 2001 From: Costa <47926492N@ICO.SCS.local> Date: Fri, 4 Feb 2022 15:42:03 +0100 Subject: [PATCH] =?UTF-8?q?Correcci=C3=B3n=20error=20tipogr=C3=A1fico.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/ggcorrplot.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/ggcorrplot.R b/R/ggcorrplot.R index 27364fb..52323bf 100644 --- a/R/ggcorrplot.R +++ b/R/ggcorrplot.R @@ -5,19 +5,19 @@ ggcorrplot<-function(df, var, color="#FFFFFF00", stat="signif", tri="all"){ order<- mcor %>% as.data.frame() %>% add_column(Var1=rownames(mcor),.before=1) %>% clustsort - mor<-mcor[order$y, order$x] + mcor<-mcor[order$y, order$x] mpval<-mpval[order$y, order$x] df<-mcor %>% as.data.frame() if (tri == "lower"){ - df[lower.tri(df, diag=T)]<-NA + df[lower.tri(df, diag=F)]<-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=T)]<-NA + df.pval[lower.tri(df.pval, diag=F)]<-NA } df.pval<-df.pval %>% add_column(Var1=rownames(mpval),.before=1) %>% gather(Var2, Value, -Var1) %>% filter(!is.na(Value))