diff --git a/R/as-tsibble.R b/R/as-tsibble.R index 8f3ebe34..018bfe46 100644 --- a/R/as-tsibble.R +++ b/R/as-tsibble.R @@ -299,7 +299,7 @@ as.tibble.tbl_ts <- as_tibble.tbl_ts as_tibble.grouped_ts <- function(x, ...) { grps <- groups(x) class(x) <- c("grouped_df", "tbl_df", "tbl", "data.frame") - attr(x, "vars") <- grps + attr(x, "vars") <- flatten(grps) x } diff --git a/R/parse-key.R b/R/parse-key.R index d8ced71d..fae3695a 100644 --- a/R/parse-key.R +++ b/R/parse-key.R @@ -11,6 +11,7 @@ reduce_key <- function(lst_keys) { quos_auto_name(comb_keys) } +# this returns a vector of groups/key characters flatten_key <- function(lst_keys) { if (is.null(lst_keys)) { lst_keys <- list()