Skip to content

Commit

Permalink
Merge pull request #54 from ITSLeeds/53-od_oneway-names
Browse files Browse the repository at this point in the history
rename oneway 1-2 vars with original names
  • Loading branch information
Robinlovelace authored Oct 7, 2024
2 parents 13bfe5c + d0bd8f5 commit 5d3f93a
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 5d3f93a

Please sign in to comment.