Skip to content

Commit

Permalink
rename oneway 1-2 vars with original names
Browse files Browse the repository at this point in the history
  • Loading branch information
temospena committed Oct 7, 2024
1 parent 13bfe5c commit d0bd8f5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/oneway.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d0bd8f5

Please sign in to comment.