Browse Source

Añadiendo los stats none y pval.

main
Marcel Costa 2 years ago
parent
commit
f6b014b0b8
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      R/ggcorrplot.R

+ 6
- 2
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)) gather(Var2, Value, -Var1) %>% filter(!is.na(Value))
df.pval$Value<-round(df.pval$Value, 3) df.pval$Value<-round(df.pval$Value, 3)
if (!stat %in% c("signif","none","pval")){stat<-"signif"}
if (stat=="signif"){ if (stat=="signif"){
df.pval$Value<-gtools::stars.pval(df.pval$Value) df.pval$Value<-gtools::stars.pval(df.pval$Value)
} }
if (stat=="none"){
df.pval$Value<-""
}
df$Var1<-factor(df$Var1, levels=order$x) df$Var1<-factor(df$Var1, levels=order$x)
df$Var2<-factor(df$Var2, levels=order$y) df$Var2<-factor(df$Var2, levels=order$y)

Loading…
Cancel
Save