Unnest cant handles lists with dates?

Following the example provided on : https://blog.exploratory.io/analyzing-mrr-monthly-recurring-revenue-using-stripe-data-in-r-and-exploratory-ea434d4aed6

mutate(recurring_month = list(seq(from=created, by = “month”, length.out = 12)))

When I try to apply the ‘unnest’ on a list of dates, an error occurred :

Each column must either be a list of vectors or a list of data frames [recurring_month]

I did the same with another a list of integers and the ‘unnest’ works … maybe there’s something wrong with list of dates … or maybe I’m not doing on the right way ?

Seems like tidyr 0.8.0 has a bug … not only with dates but with factors

1 Like

Meanwhile the bug is solved and the newer tidyr version is included, let me share how I’ve applied a dirty patch transforming the list of dates to a text list, then unnest, and then mutate again to be able to use dates …

strsplit(list_to_text(recurring_month),", ")

1 Like

Thanks Victor for sharing this workaround!