Skip to content

Commit

Permalink
feat: logic to split grouped tidytable
Browse files Browse the repository at this point in the history
  • Loading branch information
teofiln committed Nov 1, 2023
1 parent c5c7eb5 commit f8b7eb3
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 f8b7eb3

Please sign in to comment.