I have a numeric matrix of 30,000 rows and 3 columns. I would like to generate a simple PASS/FAIL vector (or factor) based on the 3 values in each row of the matrix. I would like to apply the following logic:
If all 3 values in row > 3, enter PASS, else FAIL.
I know how to do this with a for loop, but how could I do it faster? I have dozens of these matrices... Thank you!
as.matrix(rbind(c(129,129,120),c(135,97,96),c(0,0,0),c(39,4,2)))
desired output: PASS, PASS, FAIL, FAIL