Reorganizing columns by two column combination [duplicate]
问题 This question already has answers here : merge list elements which are different dimensions r [duplicate] (2 answers) Closed 6 months ago . I am currently learning the tidyr and dplyr. Went in the following issue I am not sure how to appropiatly face: Imaging the following dataset: Factor 1 Factor 2 Year value A green 2016 1.2 A green 2017 1.9 B yellow 2017 3 B yellow 2018 8 An trying to obtain: Factor 1 Factor 2 Year.2016 Year.2017 Year.2018 A green 1.2 1.9 NA B yellow NA 3 8 I have basic R