Luckily, we have already spoke at length of the basics of joining/merging s in the last section so we can jump right into how to actually perform them here.
Joining data sets in dplyr could scarcely be simpler! Just as in the last section, let’s inner join the tracks tibble and the with the artist info (including country of origin), using the following code:
> # download the artist info > download.file("https://raw.githubusercontent.com/tonyfischetti/dawr/master/working-with-packages/data/artist-info.txt", "./artist-info.txt"> artistinfo <- read_delim("./artist-info.txt", delim="\t")>> tmp <- tracks %>% inner_join(artistinfo)Joining, by = “mbid”> tmp %>% nrow 122241
How simple is that!?
There are two things I’d like to point ...