Hello! I'm trying to *save values* (*row and col*) in two matrices(1,m) or vectors. I have a loop, where a get these values:
for(i in 144){ for(j in 73){ if(B4[i,j]==1){ # B4 is a matrix(73, 144) row <- B4[i-(i-1),j] col <- B4[i,j-(j-1)] } } } *How to save row and col?* Thank you! -- View this message in context: http://r.789695.n4.nabble.com/Write-vector-matrix-in-a-loop-tp3747862p3747862.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.