I have the following data set:
Nome <- c("Laetia","Vouacapoua","Lecythis","Pourouma","Poraqueiba","Pseudopiptadenia", "Abarema");
I1 <- c(1,3,3,2,3,3,3);
I2 <- c(1,3,1,3,3,3,3);
I3 <- c(1,3,1,3,2,3,3);
I4 <- c(1,3,2,2,3,3,3)
x <- data.frame(Nome,I1,I2,I3,I4)
example:
Nome I1 I2 I3 I4
1 Laetia 1 1 1 1
2 Vouacapoua 3 3 3 3
3 Lecythis 3 1 1 2
4 Pourouma 2 3 3 2
5 Poraqueiba 3 3 2 3
6 Pseudopiptadenia 3 3 3 3
7 Abarema 3 3 3 3
I would like to exclude the rows in which rows appear the character "3", but only those that are present in all columns "I", generating this result:
Nome I1 I2 I3 I4
1 Laetia 1 1 1 1
3 Lecythis 3 1 1 2
4 Pourouma 2 3 3 2
5 Poraqueiba 3 3 2 3