Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
5
Task/Loops-Nested/R/loops-nested-2.r
Normal file
5
Task/Loops-Nested/R/loops-nested-2.r
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
m <- 10; n <- 10; mat <- matrix(sample(1:20L, m*n, replace=TRUE), nrow=m);
|
||||
x<-which(mat==20,arr.ind=TRUE,useNames=FALSE)
|
||||
x<-x[order(x[,1]),]
|
||||
for(i in mat[1:x[1,1]-1,]) print(i)
|
||||
for(i in mat[x[1,1],1:x[1,2]]) print(i)
|
||||
Loading…
Add table
Add a link
Reference in a new issue