Guest User

Untitled

a guest
Mar 23rd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. # Create data frame with a list column
  2. users <- data.frame(
  3. id = 1:3,
  4. username = c('Tom', 'Dick', 'Harry'),
  5. following = I(list(
  6. c('TeaStats', 'RobertJBlincoe'),
  7. c('JeremyCorbyn', 'realDonaldTrump'),
  8. c('Scottish_Tweets')
  9. ))
  10. )
  11.  
  12. # Show the nested data
  13. users
  14.  
  15. # Unnest any/all list columns
  16. tidyr::unnest(users)
Add Comment
Please, Sign In to add comment