I hope the Title is fitting. I have this data set Starting data frame
And whant to compare TypeX and TypeY so that the new column "Type" will result in (if one row has value missing the "Type" column will show A,B,C or D and if both TypeX and TypY is missing that row in column "Type" will show missing. Below is a picture that describes this:
How do I compute this with character values into the wished for data frame in a efficient way. I am new to R and would appriciate your help