How do I give names to the columns in a matrix column so that unnest_wider
doesn't output a message?
df <- data.frame(x = 1:2)
df$y <- matrix(1:6, ncol = 3)
df <- df %>%
rowwise() %>%
summarise(y = list(y))
df %>%
mutate(y = asplit(y, 1)) %>%
unnest_wider(c(y))
Similar question to: How to handle lack of names with unnest_wider()