Corregido el "rename" para evitar ambiguedad.

This commit is contained in:
Costa
2022-02-04 12:48:42 +01:00
parent 87697a5ded
commit 0f3f1f86a0
+1 -1
View File
@@ -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(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"){
df<-df %>% group_by(VarX,VarY) %>% summarise(Value=mean(Value))