From f6b014b0b8094d818b8c6f0c3cb1e1ef33c3d1ce Mon Sep 17 00:00:00 2001 From: Marcel Costa Date: Sat, 5 Feb 2022 08:15:40 +0100 Subject: [PATCH] =?UTF-8?q?A=C3=B1adiendo=20los=20stats=20none=20y=20pval.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- R/ggcorrplot.R | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/R/ggcorrplot.R b/R/ggcorrplot.R index 529ad2e..7300de9 100644 --- a/R/ggcorrplot.R +++ b/R/ggcorrplot.R @@ -29,11 +29,15 @@ 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)