I am using the following code to get the index of certain matches in the below matrix in R:
searchstring<-c("t1","t2") searchre