Changing value when multiple rows/columns combined do not meet a requirement
问题 Relatively new to R, working on a project with millions of rows so I made this example: I've got a matrix with three different rows of data. If the combination of [,1][,2][Farm] has less then two observations in total, the [Farm] value of that row gets changed to q99999. This way they fall in the same group for later analysis. A <- matrix(c(1,1,2,3,4,5,5), ncol = 7) B <- matrix(c(T,T,F,T,F,T,T), ncol = 7) C <- matrix(c("Req","Req","Req","fd","as","f","bla"), ncol = 7) AB <- rbind.fill.matrix