3
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 the "3" character appears, but only those that are present in all "I" columns, 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