How to select the specific rows using dplyr package in R? If column1 is NA, I want to get the value of column2, and if column2 is NA, I want to get the value of column1.
(Sample code)
test_data %>%
select(Column1, Column2) %>%
**?????**
(Example)
test_data
(Column1)|(Column2)
NA|20
NA|30
10|NA
40|NA
result
(Column)
20
30
10
40