From d0bd8f5cb03668d370d3a313aa7ffc22693e5503 Mon Sep 17 00:00:00 2001 From: RFlx Date: Mon, 7 Oct 2024 14:08:32 +0100 Subject: [PATCH] rename oneway 1-2 vars with original names #53 --- R/oneway.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/oneway.R b/R/oneway.R index 85b341f..35e9955 100644 --- a/R/oneway.R +++ b/R/oneway.R @@ -58,6 +58,8 @@ od_oneway = function(x, } x_oneway = stats::aggregate(x[attrib], list(o = x[[id1]], d = x[[id2]]), FUN, ...) + names(x_oneway)[c(1,2)] = c(id1, id2) # rename columns with original names + if (is.numeric(attrib)) { attrib_names = names(x)[attrib] } else {