Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
strengejacke committed Nov 24, 2024
1 parent e242829 commit c2a2870
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions R/data_arrange.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ data_arrange.grouped_df <- function(data, select = NULL, by = NULL, safe = TRUE,
if (is.null(by)) {
by <- colnames(group_variables)
}
# remove information specific to grouped df's
attr(data, "groups") <- NULL
class(data) <- "data.frame"
data_arrange(data = data, select = select, by = by, safe = safe, ...)
# remember attributes
info <- attributes(x)
out <- data_arrange.default(data = data, select = select, by = by, safe = safe, ...)

# set back class, so data frame still works with dplyr
attributes(out) <- utils::modifyList(info, attributes(out))
out

}


Expand Down

0 comments on commit c2a2870

Please sign in to comment.