bands <- tibble::tribble(~band, ~members,
"The Beatles", "John",
"The Beatles", "Paul",
"The Beatles", "George",
"The Beatles", "Ringo",
# Rejects duplicates and NA
"The Beatles", "Ringo",
"The Beatles", NA,
"Rolling Stones", "Mick",
"Rolling Stones", "Keith",
"Rolling Stones", "Ronnie",
"Rolling Stones", "Bill",
"Rolling Stones", "Charlie")
agg_map <- agg_table_to_agg_map(bands,
few_colname = "band",
many_colname = "members")
agg_map
agg_map_to_agg_table(agg_map, few_colname = "bands", many_colname = "members")
Run the code above in your browser using DataLab