Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create data frame with a list column
- users <- data.frame(
- id = 1:3,
- username = c('Tom', 'Dick', 'Harry'),
- following = I(list(
- c('TeaStats', 'RobertJBlincoe'),
- c('JeremyCorbyn', 'realDonaldTrump'),
- c('Scottish_Tweets')
- ))
- )
- # Show the nested data
- users
- # Unnest any/all list columns
- tidyr::unnest(users)
Add Comment
Please, Sign In to add comment