I have a dataframe as follows:
Col1 Col2 Col3 Col4 Col5 Col6 Col7
A B C E F NA
J L NA P NA NA
Z M P NA M NA
H J NA NA NA NA
A B D B NA NA
How do I insert a new column stating whether or not the last non-NA value exists in that row? I would want the final output to look like this:
Col1 Col2 Col3 Col4 Col5 Col6 Col7 Exist?
A B C E F NA No
J L NA NA NA NA No
Z M P M NA NA Yes
H J NA NA NA NA No
A B D B NA NA Yes