Spread with duplicate identifiers for rows [duplicate]
This question already has an answer here: Using spread with duplicate identifiers for rows 3 answers There has been questions on this topic before here , but I am still struggling with spreading this. I would like so each state to have its own column of temperatures values. Here is a dput() of my data. I'll call it df structure(list(date = c("2018-01-21", "2018-01-21", "2018-01-20", "2018-01-20", "2018-01-19", "2018-01-19", "2018-01-18", "2018-01-18", "2018-01-17", "2018-01-17", "2018-01-16", "2018-01-16", "2018-01-15", "2018-01-15", "2018-01-14", "2018-01-14", "2018-01-12", "2018-01-12",