Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. library(tidyverse)
  2. df <- structure(list(a = list(c("a", "b"), "c"), b = list(c("1", "2",
  3. "3"), "3"), c = c(11, 22)), class = c("tbl_df", "tbl", "data.frame"
  4. ), row.names = c(NA, -2L))
  5.  
  6. # A tibble: 2 x 3
  7. a b c
  8. <list> <list> <dbl>
  9. 1 <chr [2]> <chr [3]> 11
  10. 2 <chr [1]> <chr [1]> 22
  11.  
  12. > df %>% unnest(a, b)
  13. Error: All nested columns must have the same number of elements.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement