Añadiendo los stats none y pval.
This commit is contained in:
+5
-1
@@ -29,10 +29,14 @@ 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)
|
||||||
|
|||||||
Reference in New Issue
Block a user