Here\'s a sample data frame.
df = data.frame(company = c(\'a\', \'b\', \'c\', \'d\'), bond = c(0.2, 1, 0.3, 0), equity = c
Use rowSums to check the logic data frame should work:
rowSums
df[rowSums(df[-1] == 1.0) != 0, 'company'] [1] b d Levels: a b c d