Skip to content

Commit

Permalink
Merge pull request #584 from teofiln/master
Browse files Browse the repository at this point in the history
feat: logic to split grouped tidytable
  • Loading branch information
JohnCoene authored Nov 1, 2023
2 parents c5c7eb5 + f8b7eb3 commit 34d648a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/group2series.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ map_grps_ <- function(data, timeline = FALSE) {
splat <- purrr::map(splat, as.data.frame)
names(splat) <- keys
data <- splat
} else if (inherits(data, "grouped_tt")) {
splat <- split(data, factor(data[[attr(data, "groups")]]))
keys <- names(splat)
splat <- purrr::map(splat, as.data.frame)
names(splat) <- keys
data <- splat
} else {
if (inherits(data, "data.frame")) {
data <- as.data.frame(data)
Expand Down

0 comments on commit 34d648a

Please sign in to comment.