I have a dataset called songs.merge with variables
songID, songName, year, artist, score1, score2 and score.diff
I want to aggregate(sum) the score.diff according to the artist, count the number of songs per artist, and then remove any artists with fewer than 4 songs in the dataframe.
I am trying to use dplyr in r but it is not working. How should I proceed?
songs.merge %>%
group_by(artist) %>%
summarise_at(vars(diff),funs(sum(.,na.rm=TRUE)),
vars(songID), funs(count()))