Rows where all the values are 1. I wish to remove all such rows.
Calling your data df,
df[rowSums(df == 1) < ncol(df), ]
rowSums(df == 1) is the count of 1s in each row. We keep rows where that is strictly less than the number of columns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With