Hi All, I am trying to remove some duplicated observations from my data set. The goal is to end with a unique student id and any course they are affiliated with. For the duplicate observations (same student id and the same course) if there is a value in the grade variable it should be kept if there is no value in the grade variable it should be represented as missing This is my first post on here, sorry if I missed anything! This is how my data looks like right now: studentid Grade final_grade course 1 A MATH 1 A MATH 1 C B ECON 1 B A ENG 1 B A ENG 1 C SCI 1 F C SCI 1 B CHEM 2 D B ENG 2 B ENG 2 A CHEM 3 F C MATH This is what my end goal should look like. Each student having only 1 observation for whatever course they have taken. studentid Grade final_grade course 1 A MATH 1 C B ECON 1 B A ENG 1 F C SCI 1 B CHEM 2 D B ENG 2 A CHEM 3 F C MATH I feel like this is a simple answer, but I have scavenged the web with no use. I was originally thinking of copying the grade into the missing fields and simply deleting the duplicate observations? Started running into issues with identifying unique student id and unique course for those students. Thank you very much!
... View more