diff --git a/DESCRIPTION b/DESCRIPTION index 25a98fa..009777b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: tidyfast Title: Fast Tidying of Data -Version: 0.2.3 +Version: 0.3.0 Authors@R: c( person(given = "Tyson", family = "Barrett", diff --git a/R/unnest.R b/R/unnest.R index 8ef368a..9ceae5a 100644 --- a/R/unnest.R +++ b/R/unnest.R @@ -43,7 +43,7 @@ dt_unnest.default <- function(dt_, col){ others = others[!others_class %in% c("list", "data.table", "data.frame", "tbl_df")] # Join them all together - dt_[, eval(col)[[1L]], by = others][dt_, on = others] + dt_[seq_len(.N), eval(col)[[1L]], by = others][dt_, on = others] }