I want to check every row in data frame. I need to check all columns in that row to see if it contains a 1, if it does I want to populate another column that summarizes if any
A dplyr way would be
dplyr
a1 %>% mutate(imputed_data = ifelse(rowSums(. == 1) != 0, "yes", "no"))