I'm trying to loop over each row in my dataframe and if that row contains a 1, I'm looking "bf" to change to True so that the loop cancels and then prints out the index of row. Here's the code ive tried below.

```
bf <- FALSE
for(row in 1:nrow(df)){
   while(bf == FALSE){
      if(df[row, ] == 1){
         bf==TRUE
         print(row)

     }
   }
}

```

However what happens with this code is that it never seems to get if statement and execute it properly to my knowledge