I want the first dataset to change into the second. I tried attempting dcast() from reshape2 library but I m not successful with it. any help or idea with this please? thanks