Hello. I am trying to use a dataset (df_key) to fill in the missing values in another dataset (df1).
When the value in "Course.Name" in both datasets match, use the value in df_key's "Course.Code" to fill in the missing value in df1's "Course.Code"
Hope this is clear!
Here are the sample datasets:
df_key <- data.frame (Course.Name = c("Philosophy", "English", "Physics", "Geography"),
Course.Code = c("PHIL", "ENG", "PHYS", "GEO")
df1 <- data.frame(Course.Name = c("Physics", "English", "Geography"),
Course.Code = c("", "ENG", ""))