Given a dataframe
structure(list(ID = c("ID001", "ID002", "ID003", "ID004", "ID005",
"ID006"), Column2 = c(1L, 0L, 1L, 0L, 1L, 1L), Column3 = c(0L,
0L, 0L, 0L, 0L, 0L), Column4 = c(1L, 0L, 1L, 1L, 0L, 0L), Column5 = c(1L,
1L, 0L, 0L, 1L, 1L)), class = "data.frame", row.names = c(NA,
-6L))
How would one return the IDs that are in rows that have Columns with more than a single one? For example row 1 has 3 ones in separate columns, which are Column 2,4,5 so ID001 should be returned. however, row 2 should not be returned because only Column 5 has 1 and no others.
These Ids should be returned Id001, ID003, ID005, ID006