|
|
@ -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)) |
|
|
|