diff --git a/R/ggcorrplot.R b/R/ggcorrplot.R index ed4b866..b63666e 100644 --- a/R/ggcorrplot.R +++ b/R/ggcorrplot.R @@ -1,4 +1,4 @@ -ggcorrplot<-function(df, var){ +ggcorrplot<-function(df, var, color="#FFFFFF00"){ m.df<-df %>% spread(Cyt, Value) %>% select(-pats) mcor<-cor(m.df, m.df, use="pairwise.complete.obs") # Por defecto usa el método de Pearson. mpval<-Hmisc::rcorr(as.matrix(m.df))$P @@ -13,6 +13,6 @@ ggcorrplot<-function(df, var){ ggplot(df, aes(Var1, Var2, fill=Value))+ scale_x_discrete(limits=order$x)+ scale_y_discrete(limits=order$y)+ - theme_heatmap(line.color="black")+ + theme_heatmap(line.color=color)+ geom_text(data=df.pval, aes(label=round(Value, 2))) }