I tried searching and found answers to replacing blank row values with other columns but not on the conditions. Let me explain.
I have a data frame that looks like this:
Name Grade Test1 Test2 Test3
John A none none
Jane B ok none
David none C barely
Sam B none
Thomas D fail
I would like replace the missing grades in the Grade column with only the letter grades (remove the following comments) from the other columns. There will never be multiple letter grades in Test1/Test2/Test3 columns. So the result I'm loolking for is this:
Name Grade Test1 Test2 Test3
John A none none
Jane B B ok none
David C none C barely
Sam B none
Thomas D D fail
Any help would be appreciated!
dput(data)
to the post so we can easily load the data – Rich Scriven