For example: I already have my_matrix which is just a simple reactive matrix. I want to extract its rows and assign them to another matrix:
R<-as.matrix(NA) # create an initial matrix to keep results while looping
for (i in 1:10) { R[i]<-(my_matrix()[i,]) }