File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -415,7 +415,7 @@ arrange_row_canonical.default <- function(x, ...) {
415415arrange_row_canonical.epi_df <- function (x , ... ) {
416416 rlang :: check_dots_empty()
417417 cols <- key_colnames(x )
418- x % > % dplyr :: arrange( dplyr :: across( dplyr :: all_of( cols )))
418+ x [ vctrs :: vec_order( x [ cols ]), ]
419419}
420420
421421arrange_col_canonical <- function (x , ... ) {
@@ -434,8 +434,10 @@ arrange_col_canonical.default <- function(x, ...) {
434434# ' @export
435435arrange_col_canonical.epi_df <- function (x , ... ) {
436436 rlang :: check_dots_empty()
437- cols <- key_colnames(x )
438- x %> % dplyr :: relocate(dplyr :: all_of(cols ), .before = 1 )
437+ all_names <- names(x )
438+ key_names <- key_colnames(x )
439+ val_names <- all_names [! all_names %in% key_names ]
440+ x [c(key_names , val_names )]
439441}
440442
441443# ' Group an `epi_df` object by default keys
You can’t perform that action at this time.
0 commit comments