|
@ -10,14 +10,14 @@ ggcorrplot<-function(df, var, color="#FFFFFF00", stat="signif", tri="all"){ |
|
|
|
|
|
|
|
|
df<-mcor %>% as.data.frame() |
|
|
df<-mcor %>% as.data.frame() |
|
|
if (tri == "lower"){ |
|
|
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) %>% |
|
|
df<-df %>% add_column(Var1=rownames(mcor),.before=1) %>% |
|
|
gather(Var2, Value, -Var1) %>% filter(!is.na(Value)) |
|
|
gather(Var2, Value, -Var1) %>% filter(!is.na(Value)) |
|
|
|
|
|
|
|
|
df.pval<-mpval %>% as.data.frame() |
|
|
df.pval<-mpval %>% as.data.frame() |
|
|
if (tri == "lower"){ |
|
|
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) %>% |
|
|
df.pval<-df.pval %>% add_column(Var1=rownames(mpval),.before=1) %>% |
|
|
gather(Var2, Value, -Var1) %>% filter(!is.na(Value)) |
|
|
gather(Var2, Value, -Var1) %>% filter(!is.na(Value)) |
|
|