|
@ -3,7 +3,7 @@ ggheatmap<-function(df, x=NULL, y=NULL, value=NULL, grouping="mean"){ |
|
|
if (is.null(y)){y=colnames(df)[2]} |
|
|
if (is.null(y)){y=colnames(df)[2]} |
|
|
if (is.null(value)){value=colnames(df)[3]} |
|
|
if (is.null(value)){value=colnames(df)[3]} |
|
|
|
|
|
|
|
|
df<-rename(df, "VarX"=x, "VarY"=y, "Value"=value) |
|
|
|
|
|
|
|
|
df<-rename(df, "VarX"=all_of(x), "VarY"=all_of(y), "Value"=all_of(value)) |
|
|
|
|
|
|
|
|
if (grouping == "mean"){ |
|
|
if (grouping == "mean"){ |
|
|
df<-df %>% group_by(VarX,VarY) %>% summarise(Value=mean(Value)) |
|
|
df<-df %>% group_by(VarX,VarY) %>% summarise(Value=mean(Value)) |
|
|