Hi,
## Better way to make your matrix
A - rbind(c(16,10,2,4,8,7),
c(16,10,12,14,8,7),
c(16,10,13,15,19,17),
c(16,9,13,15,9,7))
## Create logical matrices for conditions 1 2
B1 - rowSums(A[, 2:4] 10) 0
B2 - rowSums(A[, 5:6] 10) 0
## initialize X at the catch all
X - rep(3L, nrow(A))
##
Suppose I have a matrix like
A=matrix(0,4,6)
A[1,]=c(16,10,2,4,8,7)
A[2,]=c(16,10,12,14,8,7)
A[3,]=c(16,10,13,15,19,17)
A[4,]=c(16,9,13,15,9,7)
A
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 16 102487
[2,] 16 10 12 1487
[3,] 16 10 13 151917
[4,]
2 matches
Mail list logo