I want to delete column(s) in R data frame if their last value is NA.
Example data frame is below
A B C D
11 10 19 20
22 20 29 40
33 30 39 60
44 NA NA 80
I would like to get the following output (Column B and C dropped because they had NA values in the last row)
A D
11 20
22 40
33 60
44 80
Tried but couldn't get any solution to work. Appreciate your help.